Go to the documentation of this file.
14 #ifndef LLVM_CLANG_SEMA_SEMA_H
15 #define LLVM_CLANG_SEMA_SEMA_H
61 #include "llvm/ADT/ArrayRef.h"
62 #include "llvm/ADT/Optional.h"
63 #include "llvm/ADT/SetVector.h"
64 #include "llvm/ADT/SmallBitVector.h"
65 #include "llvm/ADT/SmallPtrSet.h"
66 #include "llvm/ADT/SmallSet.h"
67 #include "llvm/ADT/SmallVector.h"
68 #include "llvm/ADT/TinyPtrVector.h"
69 #include "llvm/Frontend/OpenMP/OMPConstants.h"
78 template <
typename ValueT,
typename ValueInfoT>
class DenseSet;
80 struct InlineAsmIdentifierInfo;
87 class ASTMutationListener;
97 class CXXBindTemporaryExpr;
99 class CXXConstructorDecl;
100 class CXXConversionDecl;
102 class CXXDestructorDecl;
103 class CXXFieldCollector;
104 class CXXMemberCallExpr;
110 class ClassTemplateDecl;
111 class ClassTemplatePartialSpecializationDecl;
112 class ClassTemplateSpecializationDecl;
113 class VarTemplatePartialSpecializationDecl;
114 class CodeCompleteConsumer;
115 class CodeCompletionAllocator;
116 class CodeCompletionTUInfo;
117 class CodeCompletionResult;
118 class CoroutineBodyStmt;
120 class DeclAccessPair;
123 class DeclaratorDecl;
124 class DeducedTemplateArgument;
125 class DependentDiagnostic;
126 class DesignatedInitExpr;
129 class EnumConstantDecl;
135 class FunctionProtoType;
136 class FunctionTemplateDecl;
137 class ImplicitConversionSequence;
140 class InitializationKind;
141 class InitializationSequence;
142 class InitializedEntity;
143 class IntegerLiteral;
147 class LocalInstantiationScope;
152 class MultiLevelTemplateArgumentList;
154 class ObjCCategoryDecl;
155 class ObjCCategoryImplDecl;
156 class ObjCCompatibleAliasDecl;
157 class ObjCContainerDecl;
159 class ObjCImplementationDecl;
160 class ObjCInterfaceDecl;
162 template <
class T>
class ObjCList;
163 class ObjCMessageExpr;
164 class ObjCMethodDecl;
165 class ObjCPropertyDecl;
166 class ObjCProtocolDecl;
167 class OMPThreadPrivateDecl;
168 class OMPRequiresDecl;
169 class OMPDeclareReductionDecl;
170 class OMPDeclareSimdDecl;
172 struct OMPVarListLocTy;
173 struct OverloadCandidate;
176 class OverloadCandidateSet;
181 class PseudoDestructorTypeStorage;
182 class PseudoObjectExpr;
184 class StandardConversionSequence;
188 class TemplateArgument;
189 class TemplateArgumentList;
190 class TemplateArgumentLoc;
192 class TemplateInstantiationCallback;
193 class TemplateParameterList;
194 class TemplatePartialOrderingContext;
195 class TemplateTemplateParmDecl;
199 class TypedefNameDecl;
201 class TypoCorrectionConsumer;
203 class UnresolvedLookupExpr;
204 class UnresolvedMemberExpr;
205 class UnresolvedSetImpl;
206 class UnresolvedSetIterator;
208 class UsingShadowDecl;
211 class VarTemplateSpecializationDecl;
212 class VisibilityAttr;
213 class VisibleDeclConsumer;
214 class IndirectFieldDecl;
215 struct DeductionFailureInfo;
216 class TemplateSpecCandidateSet;
219 class AccessedEntity;
220 class BlockScopeInfo;
222 class CapturedRegionScopeInfo;
223 class CapturingScopeInfo;
224 class CompoundScopeInfo;
225 class DelayedDiagnostic;
226 class DelayedDiagnosticPool;
227 class FunctionScopeInfo;
228 class LambdaScopeInfo;
229 class PossiblyUnreachableDiag;
230 class SemaPPCallbacks;
231 class TemplateDeductionInfo;
234 namespace threadSafety {
241 typedef std::pair<llvm::PointerUnion<const TemplateTypeParmType*, NamedDecl*>,
266 llvm::DenseMap<FileID, FileNullability> Map;
277 if (file ==
Cache.File)
278 return Cache.Nullability;
281 if (!
Cache.File.isInvalid()) {
287 Cache.Nullability = Map[file];
288 return Cache.Nullability;
329 void emit(raw_ostream &Out);
333 bool emit(StringRef MainSrc);
354 StringRef StableName) {
355 auto Itr = llvm::find_if(KernelDescs, [SyclKernel](
const KernelDesc &KD) {
356 return KD.SyclKernel == SyclKernel;
359 assert(Itr != KernelDescs.end() &&
"Unknown kernel description");
360 Itr->updateKernelNames(Name, StableName);
367 NeedToEmitDeviceGlobalRegistration =
true;
372 struct KernelParamDesc {
384 KernelParamDesc() =
default;
390 const FunctionDecl *SyclKernel;
401 SourceLocation KernelLocation;
407 SmallVector<KernelParamDesc, 8> Params;
411 bool IsUnnamedKernel;
416 KernelDesc(
const FunctionDecl *SyclKernel, QualType NameType,
417 SourceLocation KernelLoc,
bool IsESIMD,
bool IsUnnamedKernel,
419 : SyclKernel(SyclKernel), NameType(NameType), KernelLocation(KernelLoc),
420 IsESIMDKernel(IsESIMD), IsUnnamedKernel(IsUnnamedKernel),
424 this->Name = Name.str();
425 this->StableName = StableName.str();
431 KernelDesc *getCurKernelDesc() {
432 return KernelDescs.size() > 0 ? &KernelDescs[KernelDescs.size() - 1]
439 SmallVector<KernelDesc, 4> KernelDescs;
441 using SpecConstID = std::pair<QualType, std::string>;
452 bool NeedToEmitDeviceGlobalRegistration =
false;
458 bool emit(StringRef MainSrc);
462 bool emit(raw_ostream &O);
465 void emitSpecIDName(raw_ostream &O,
const VarDecl *VD);
492 llvm::function_ref<
QualType()> ComputeType);
510 if (!Enabled || Tok != ExpectedLoc)
515 return ComputeType();
527 llvm::function_ref<
QualType()> ComputeType;
533 void operator=(
const Sema &) =
delete;
539 bool isMultiplexExternalSource;
541 static bool mightHaveNonExternalLinkage(
const DeclaratorDecl *FD);
548 bool shouldLinkPossiblyHiddenDecl(
const NamedDecl *Old,
556 "should not have found a non-externally-declarable previous decl");
563 void setupImplicitSpecialMemberType(
CXXMethodDecl *SpecialMem,
673 : PackAttr(
true), AlignMode(M), PackNumber(Num), XLStack(IsXL) {
674 assert(Num == PackNumber &&
"The pack number has been truncated.");
679 : PackAttr(
false), AlignMode(M),
680 PackNumber(M ==
Packed ? 1 : UninitPackVal), XLStack(IsXL) {}
705 bool IsXL =
static_cast<bool>(
Encoding & IsXLMask);
708 int PackNumber = (
Encoding & PackNumMask) >> 4;
727 return PackNumber != UninitPackVal && PackNumber != 0;
733 return std::tie(AlignMode, PackNumber, PackAttr, XLStack) ==
734 std::tie(Info.AlignMode, Info.PackNumber, Info.PackAttr,
739 return !(*
this == Info);
751 unsigned char PackNumber;
757 static constexpr
unsigned char UninitPackVal = -1;
760 static constexpr uint32_t IsXLMask{0x0000
'0001};
761 static constexpr uint32_t AlignModeMask{0x0000'0006};
762 static constexpr uint32_t PackAttrMask{0x00000
'0008};
763 static constexpr uint32_t PackNumMask{0x0000'01F0};
766 template<
typename ValueType>
781 llvm::StringRef StackSlotLabel, ValueType
Value) {
791 if (!StackSlotLabel.empty()) {
793 auto I = llvm::find_if(llvm::reverse(
Stack), [&](
const Slot &
x) {
794 return x.StackSlotLabel == StackSlotLabel;
797 if (I !=
Stack.rend()) {
800 Stack.erase(std::prev(I.base()),
Stack.end());
802 }
else if (!
Stack.empty()) {
831 "Can only push / pop #pragma stack sentinels!");
1074 std::unique_ptr<LateParsedTemplate>>
1127 state.SavedPool = CurPool;
1136 CurPool =
state.SavedPool;
1143 state.SavedPool = CurPool;
1150 assert(CurPool ==
nullptr);
1151 CurPool =
state.SavedPool;
1162 unsigned SavedFunctionScopesStart;
1163 unsigned SavedInventedParameterInfosStart;
1173 assert(ContextToPush &&
"pushing null context");
1174 S.CurContext = ContextToPush;
1176 S.CXXThisTypeOverride =
QualType();
1178 S.FunctionScopesStart = S.FunctionScopes.size();
1179 S.InventedParameterInfosStart = S.InventedParameterInfos.size();
1183 if (!SavedContext)
return;
1184 S.CurContext = SavedContext;
1185 S.DelayedDiagnostics.popUndelayed(SavedContextState);
1186 S.CXXThisTypeOverride = SavedCXXThisTypeOverride;
1187 S.FunctionScopesStart = SavedFunctionScopesStart;
1188 S.InventedParameterInfosStart = SavedInventedParameterInfosStart;
1189 SavedContext =
nullptr;
1216 bool PushedCodeSynthesisContext =
false;
1220 : S(S), SavedContext(S, DC) {
1221 S.PushFunctionScope();
1222 S.PushExpressionEvaluationContext(
1224 if (
auto *FD = dyn_cast<FunctionDecl>(DC))
1225 FD->setWillHaveBody(
true);
1227 assert(isa<ObjCMethodDecl>(DC));
1231 assert(!PushedCodeSynthesisContext);
1236 Ctx.
Entity = cast<Decl>(S.CurContext);
1237 S.pushCodeSynthesisContext(Ctx);
1239 PushedCodeSynthesisContext =
true;
1243 if (PushedCodeSynthesisContext)
1244 S.popCodeSynthesisContext();
1245 if (
auto *FD = dyn_cast<FunctionDecl>(S.CurContext))
1246 FD->setWillHaveBody(
false);
1247 S.PopExpressionEvaluationContext();
1248 S.PopFunctionScopeInfo();
1264 llvm::SmallDenseSet<WeakInfo, 2u, WeakInfo::DenseMapInfoByAliasOnly>>>
1537 std::tuple<MangleNumberingContext *, Decl *>
1555 llvm::PointerIntPair<CXXMethodDecl *, 2> Pair;
1570 :
public llvm::FastFoldingSetNode,
1574 : FastFoldingSetNode(
ID)
1600 typedef llvm::DenseMap<ParmVarDecl *, llvm::TinyPtrVector<ParmVarDecl *>>
1631 const llvm::MapVector<FieldDecl *, DeleteLocs> &
1636 using Lists = std::pair<ObjCMethodList, ObjCMethodList>;
1637 using iterator = llvm::DenseMap<Selector, Lists>::iterator;
1641 std::pair<iterator, bool>
insert(std::pair<Selector, Lists> &&Val) {
1642 return Methods.insert(Val);
1645 bool empty()
const {
return Methods.empty(); }
1648 llvm::DenseMap<Selector, Lists> Methods;
1679 typedef llvm::PointerIntPair<CXXRecordDecl *, 3, CXXSpecialMember>
1755 bool WarnedDarwinSDKInfoMissing =
false;
1787 StringRef Platform);
1807 llvm::function_ref<
void()> Fn);
1855 template <
typename T>
1866 template <
typename T,
typename =
typename std::enable_if<
1867 !std::is_lvalue_reference<T>::value>
::type>
1870 BaseDiag << std::move(
V);
1900 LLVM_MARK_AS_BITMASK_ENUM(
All)
1906 typedef std::pair<const FunctionDecl *, const FunctionDecl *> CallPair;
1914 UndefinedReachableFromSyclDevice.push_back(std::make_pair(Callee, Caller));
1920 return llvm::any_of(UndefinedReachableFromSyclDevice,
1921 [Callee, Caller](
const CallPair &
P) {
1922 return P.first == Callee &&
P.second == Caller;
1977 template <
typename T>
1980 if (
Diag.ImmediateDiag.hasValue())
1982 else if (
Diag.PartialDiagId.hasValue())
1993 template <
typename T,
typename =
typename std::enable_if<
1994 !std::is_lvalue_reference<T>::value>
::type>
1996 if (ImmediateDiag.hasValue())
1997 *ImmediateDiag << std::move(
V);
1998 else if (PartialDiagId.hasValue())
2006 if (
Diag.ImmediateDiag.hasValue())
2008 else if (
Diag.PartialDiagId.hasValue())
2016 if (ImmediateDiag.hasValue())
2017 ImmediateDiag->AddFixItHint(Hint);
2018 else if (PartialDiagId.hasValue())
2054 bool DeferHint =
false);
2058 bool DeferHint =
false);
2069 bool SavedDeferDiags =
false;
2143 unsigned OpenMPCaptureLevel = 0);
2156 std::unique_ptr<sema::FunctionScopeInfo, PoppedFunctionScopeDeleter>;
2160 const Decl *D =
nullptr,
2194 getCurLambda(
bool IgnoreNonLambdaCapturingScope =
false);
2212 unsigned TemplateParameterDepth);
2233 Expr *ArraySize,
unsigned Quals,
2247 SYCLIntelFPGAIVDepAttr *
2252 OpenCLUnrollHintAttr *
2255 SYCLIntelFPGALoopCountAttr *
2257 SYCLIntelFPGAInitiationIntervalAttr *
2260 SYCLIntelFPGAMaxConcurrencyAttr *
2262 SYCLIntelFPGAMaxInterleavingAttr *
2264 SYCLIntelFPGASpeculatedIterationsAttr *
2267 SYCLIntelFPGALoopCoalesceAttr *
2400 std::index_sequence<Is...>)
const {
2402 bool Dummy[] = {
false, (DB << getPrintable(std::get<Is>(
Args)))...};
2409 assert(
DiagID != 0 &&
"no diagnostic for type diagnoser");
2414 emit(DB, std::index_sequence_for<Ts...>());
2433 template <
typename... Ts>
2441 this->
emit(DB, std::index_sequence_for<Ts...>());
2469 void CheckAddressOfNoDeref(
const Expr *E);
2470 void CheckMemberAccessOfNoDeref(
const MemberExpr *E);
2475 struct ModuleScope {
2478 bool ModuleInterface =
false;
2479 bool IsPartition =
false;
2480 bool ImplicitGlobalModuleFragment =
false;
2495 Module *getCurrentModule()
const {
2496 return ModuleScopes.empty() ? nullptr : ModuleScopes.back().Module;
2501 bool isCurrentModulePurview()
const {
2502 return getCurrentModule() ? getCurrentModule()->
isModulePurview() :
false;
2506 Module *PushGlobalModuleFragment(SourceLocation BeginLoc,
bool IsImplicit);
2508 void PopGlobalModuleFragment();
2510 VisibleModuleSet VisibleModules;
2519 return DirectModuleImports.contains(M);
2531 VisibleModules.setVisible(Mod, ImportLoc);
2558 bool OnlyNeedComplete =
false);
2593 return !RequireCompleteTypeImpl(Loc, T,
Kind,
nullptr);
2608 template <
typename... Ts>
2610 const Ts &...Args) {
2615 template <
typename... Ts>
2617 const Ts &... Args) {
2634 TypeDiagnoser &Diagnoser);
2637 template <
typename... Ts>
2643 template <
typename... Ts>
2645 const Ts &... Args) {
2651 TypeDiagnoser &Diagnoser);
2654 template <
typename... Ts>
2656 const Ts &...Args) {
2663 TagDecl *OwnedTagDecl =
nullptr);
2698 bool isClassName =
false,
bool HasTrailingDot =
false,
2700 bool IsCtorOrDtorName =
false,
2701 bool WantNontrivialTypeSourceInfo =
false,
2702 bool IsClassTemplateDeductionContext =
true,
2711 bool IsTemplateName =
false);
2719 bool IsTemplateTypeArg);
2794 Result.NonTypeDecl = D;
2808 Result.Template = Name;
2814 Result.Template = Name;
2820 Result.Template = Name;
2826 Result.Template = Name;
2832 Result.Template = Name;
2873 llvm_unreachable(
"unsupported name classification.");
2900 const Token &NextToken,
2912 bool IsAddressOfOperand);
2918 const Token &NextToken);
2941 if (
auto *DRE = dyn_cast<DeclRefExpr>(E.
get()))
2942 return !DRE->hasExplicitTemplateArgs();
2943 if (
auto *ME = dyn_cast<MemberExpr>(E.
get()))
2944 return !ME->hasExplicitTemplateArgs();
2946 if (
auto *DSDRE = dyn_cast<DependentScopeDeclRefExpr>(E.
get()))
2947 return !DSDRE->hasExplicitTemplateArgs();
2948 if (
auto *DSME = dyn_cast<CXXDependentScopeMemberExpr>(E.
get()))
2949 return !DSME->hasExplicitTemplateArgs();
2966 unsigned FailedFoldDiagID);
3001 llvm::DenseMap<const NamedDecl *, const NamedDecl *> ShadowingDecls;
3058 bool IsMemberSpecialization);
3126 unsigned NonTrivialKind);
3154 SkipBodyInfo *SkipBody =
nullptr);
3157 SkipBodyInfo *SkipBody =
nullptr);
3159 SkipBodyInfo *SkipBody =
nullptr);
3165 return D && isa<ObjCMethodDecl>(D);
3239 void HandleStartOfHeaderUnit();
3272 bool IsPartition =
false);
3342 bool IsExplicitInstantiation,
3389 bool ScopedEnumUsesClassTag,
TypeResult UnderlyingType,
3390 bool IsTypeSpecifier,
bool IsTemplateParamOrArg,
3391 SkipBodyInfo *SkipBody =
nullptr);
3420 Expr *BitfieldWidth,
3428 bool Mutable,
Expr *BitfieldWidth,
3447 bool Diagnose =
false);
3461 : SpecialMember(
CXXInvalid), Comparison(Comp) {}
3478 "invalid should have highest index");
3480 "none should be equal to zero");
3481 return SpecialMember + (
unsigned)Comparison;
3514 SkipBodyInfo &SkipBody);
3528 bool IsFinalSpelledSealed,
3559 QualType EnumUnderlyingTy,
bool IsFixed,
3623 bool AllowInlineNamespace =
false);
3682 VersionTuple Introduced, VersionTuple Deprecated,
3683 VersionTuple Obsoleted,
bool IsUnavailable,
3684 StringRef Message,
bool IsStrict, StringRef Replacement,
3686 TypeVisibilityAttr *
3688 TypeVisibilityAttr::VisibilityType Vis);
3690 VisibilityAttr::VisibilityType Vis);
3692 StringRef UuidAsWritten,
MSGuidDecl *GuidDecl);
3700 StringRef NewUserDiagnostic);
3718 const InternalLinkageAttr &AL);
3720 Decl *D,
const WebAssemblyImportNameAttr &AL);
3722 Decl *D,
const WebAssemblyImportModuleAttr &AL);
3725 const EnforceTCBLeafAttr &AL);
3733 bool MergeTypeWithOld);
3735 Scope *S,
bool MergeTypeWithOld);
3775 bool IsForUsingDecl);
3777 bool ConsiderCudaAttrs =
true,
3778 bool ConsiderRequiresClauses =
true);
3791 bool SuppressUserConversions,
3793 bool InOverloadResolution,
3795 bool AllowObjCWritebackConversion);
3801 bool InOverloadResolution,
3802 QualType& ConvertedType,
bool &IncompatibleObjC);
3804 QualType& ConvertedType,
bool &IncompatibleObjC);
3811 unsigned *ArgPos =
nullptr);
3820 bool IgnoreBaseAccess,
3821 bool Diagnose =
true);
3823 bool InOverloadResolution,
3828 bool IgnoreBaseAccess);
3830 bool CStyle,
bool &ObjCLifetimeConversion);
3846 bool TopLevelOfInitList =
false,
3847 bool AllowExplicit =
false);
3927 bool AllowScopedEnumerations;
3933 AllowScopedEnumerations(AllowScopedEnumerations) {}
3989 bool SuppressUserConversions =
false,
3990 bool PartialOverloading =
false,
3991 bool AllowExplicit =
true,
3992 bool AllowExplicitConversion =
false,
4000 bool SuppressUserConversions =
false,
4001 bool PartialOverloading =
false,
4002 bool FirstArgumentIsBase =
false);
4008 bool SuppressUserConversion =
false,
4011 DeclAccessPair FoundDecl,
4012 CXXRecordDecl *ActingContext, QualType ObjectType,
4013 Expr::Classification ObjectClassification,
4014 ArrayRef<Expr *> Args,
4015 OverloadCandidateSet& CandidateSet,
4016 bool SuppressUserConversions =
false,
4017 bool PartialOverloading =
false,
4021 DeclAccessPair FoundDecl,
4022 CXXRecordDecl *ActingContext,
4023 TemplateArgumentListInfo *ExplicitTemplateArgs,
4024 QualType ObjectType,
4025 Expr::Classification ObjectClassification,
4026 ArrayRef<Expr *> Args,
4027 OverloadCandidateSet& CandidateSet,
4028 bool SuppressUserConversions =
false,
4029 bool PartialOverloading =
false,
4032 FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl,
4033 TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args,
4034 OverloadCandidateSet &CandidateSet,
bool SuppressUserConversions =
false,
4035 bool PartialOverloading =
false,
bool AllowExplicit =
true,
4039 FunctionTemplateDecl *FunctionTemplate, ArrayRef<QualType> ParamTypes,
4040 ArrayRef<Expr *> Args, OverloadCandidateSet &CandidateSet,
4042 CXXRecordDecl *ActingContext =
nullptr, QualType ObjectType = QualType(),
4043 Expr::Classification ObjectClassification = {},
4046 CXXConversionDecl *Conversion, DeclAccessPair FoundDecl,
4047 CXXRecordDecl *ActingContext, Expr *From, QualType ToType,
4048 OverloadCandidateSet &CandidateSet,
bool AllowObjCConversionOnExplicit,
4049 bool AllowExplicit,
bool AllowResultConversion =
true);
4051 FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl,
4052 CXXRecordDecl *ActingContext, Expr *From, QualType ToType,
4053 OverloadCandidateSet &CandidateSet,
bool AllowObjCConversionOnExplicit,
4054 bool AllowExplicit,
bool AllowResultConversion =
true);
4056 DeclAccessPair FoundDecl,
4057 CXXRecordDecl *ActingContext,
4058 const FunctionProtoType *Proto,
4059 Expr *Object, ArrayRef<Expr *> Args,
4060 OverloadCandidateSet& CandidateSet);
4062 const UnresolvedSetImpl &Functions, ArrayRef<Expr *> Args,
4063 OverloadCandidateSet &CandidateSet,
4064 TemplateArgumentListInfo *ExplicitTemplateArgs =
nullptr);
4066 SourceLocation OpLoc, ArrayRef<Expr *> Args,
4067 OverloadCandidateSet &CandidateSet,
4070 OverloadCandidateSet& CandidateSet,
4071 bool IsAssignmentOperator =
false,
4072 unsigned NumContextualBoolArguments = 0);
4074 SourceLocation OpLoc, ArrayRef<Expr *> Args,
4075 OverloadCandidateSet& CandidateSet);
4078 ArrayRef<Expr *> Args,
4079 TemplateArgumentListInfo *ExplicitTemplateArgs,
4080 OverloadCandidateSet& CandidateSet,
4081 bool PartialOverloading =
false);
4085 NamedDecl *Found, FunctionDecl *Fn,
4087 QualType DestType = QualType(),
bool TakingAddress =
false);
4092 bool TakingAddress =
false);
4096 EnableIfAttr *
CheckEnableIf(FunctionDecl *Function, SourceLocation CallLoc,
4097 ArrayRef<Expr *> Args,
4098 bool MissingImplicitThis =
false);
4112 const Expr *ThisArg,
4113 ArrayRef<const Expr *> Args,
4114 SourceLocation Loc);
4124 SourceLocation Loc);
4131 bool Complain =
false,
4132 SourceLocation Loc = SourceLocation());
4144 QualType TargetType,
4146 DeclAccessPair &Found,
4147 bool *pHadMultipleCandidates =
nullptr);
4153 ExprResult &SrcExpr,
bool DoFunctionPointerConversion =
false);
4157 bool Complain =
false,
4158 DeclAccessPair *Found =
nullptr);
4162 bool DoFunctionPointerConverion =
false,
4163 bool Complain =
false,
4164 SourceRange OpRangeForComplaining = SourceRange(),
4165 QualType DestTypeForComplaining = QualType(),
4166 unsigned DiagIDForComplaining = 0);
4170 DeclAccessPair FoundDecl,
4173 DeclAccessPair FoundDecl,
4177 ArrayRef<Expr *> Args,
4178 OverloadCandidateSet &CandidateSet,
4179 bool PartialOverloading =
false);
4181 LookupResult &R, TemplateArgumentListInfo *ExplicitTemplateArgs,
4182 ArrayRef<Expr *> Args, OverloadCandidateSet &CandidateSet);
4205 bool AllowTypoCorrection=
true,
4206 bool CalleesAddressIsTaken=
false);
4217 bool PerformADL =
true);
4222 Expr *input,
bool RequiresADL =
true);
4232 bool RequiresADL =
true,
4233 bool AllowRewrittenCandidates =
true,
4248 Expr *ExecConfig =
nullptr,
4249 bool IsExecConfig =
false,
4250 bool AllowRecovery =
false);
4258 bool *NoArrowOperatorFound =
nullptr);
4268 bool CheckParameterNames);
4374 ->getOwningModuleForLinkage(
true))
4416 struct TypoExprState {
4417 std::unique_ptr<TypoCorrectionConsumer>
Consumer;
4421 TypoExprState(TypoExprState &&other) noexcept;
4422 TypoExprState &operator=(TypoExprState &&other) noexcept;
4426 llvm::MapVector<TypoExpr *, TypoExprState> DelayedTypos;
4429 TypoExpr *createDelayedTypo(std::unique_ptr<TypoCorrectionConsumer> TCC,
4437 llvm::MapVector<NamespaceDecl*, bool> KnownNamespaces;
4441 bool LoadedExternalKnownNamespaces;
4446 std::unique_ptr<TypoCorrectionConsumer>
4453 bool ErrorRecovery);
4474 bool AllowBuiltinCreation =
false);
4476 bool InUnqualifiedLookup =
false);
4480 bool AllowBuiltinCreation =
false,
4481 bool EnteringContext =
false);
4498 bool RValueThis,
unsigned ThisQuals);
4502 bool RValueThis,
unsigned ThisQuals);
4509 bool AllowRaw,
bool AllowTemplate,
4510 bool AllowStringTemplate,
bool DiagnoseMissing,
4523 bool Final =
false);
4534 bool IncludeGlobalScope =
true,
4535 bool LoadExternal =
true);
4538 bool IncludeGlobalScope =
true,
4539 bool IncludeDependentBases =
false,
4540 bool LoadExternal =
true);
4553 bool EnteringContext =
false,
4555 bool RecordFailure =
true);
4564 bool EnteringContext =
false,
4586 bool RecoverUncorrectedTypos =
false,
4592 bool RecoverUncorrectedTypos =
false,
4598 RecoverUncorrectedTypos,
Filter);
4602 const PartialDiagnostic &TypoDiag,
4603 bool ErrorRecovery =
true);
4606 const PartialDiagnostic &TypoDiag,
4607 const PartialDiagnostic &PrevNote,
4608 bool ErrorRecovery =
true);
4613 ArrayRef<Expr *> Args,
4618 bool ConsiderLinkage,
bool AllowInlineNamespace);
4629 ArrayRef<Expr *> SubExprs,
4630 QualType T = QualType());
4633 SourceLocation IdLoc,
4634 bool TypoCorrection =
false);
4635 FunctionDecl *
CreateBuiltin(IdentifierInfo *II, QualType Type,
unsigned ID,
4636 SourceLocation Loc);
4638 Scope *S,
bool ForRedeclaration,
4639 SourceLocation Loc);
4653 const ParsedAttributesView &AttrList);
4655 bool IncludeCXX11Attributes =
true);
4657 const ParsedAttributesView &AttrList);
4666 bool SkipArgCountCheck =
false);
4668 bool SkipArgCountCheck =
false);
4678 const FunctionDecl *FD =
nullptr);
4682 const Expr *E, StringRef &Str,
4683 SourceLocation *ArgLocation =
nullptr);
4686 SourceLocation *ArgLocation =
nullptr);
4692 bool &HasDefault,
bool &HasCommas,
4693 SmallVectorImpl<StringRef> &Strings);
4695 CXXRecordDecl *RD, SourceRange Range,
bool BestCase,
4704 SourceLocation Loc);
4718 SmallVectorImpl<const Attr *> &OutAttrs);
4721 ObjCMethodDecl *MethodDecl,
4722 bool IsProtocolMethodDecl);
4725 ObjCMethodDecl *Overridden,
4726 bool IsProtocolMethodDecl);
4731 ObjCMethodDecl *MethodDecl,
4732 bool IsProtocolMethodDecl);
4746 bool IncompleteImpl =
false);
4752 bool SynthesizeProperties);
4791 const bool isReadWrite,
4792 unsigned &Attributes,
4793 const unsigned AttributesAsWritten,
4809 const bool isReadWrite,
4810 const unsigned Attributes,
4811 const unsigned AttributesAsWritten,
4850 bool &IncompleteImpl,
4851 bool ImmediateClass,
4852 bool WarnCategoryMethodImpl=
false);
4868 void AddMethodToGlobalPool(
ObjCMethodDecl *Method,
bool impl,
bool instance);
4873 bool receiverIdOrClass,
4885 bool InstanceFirst,
bool CheckTheOther,
4896 bool receiverIdOrClass);
4908 bool RecordFailure =
true) {
4920 AddMethodToGlobalPool(Method, impl,
true);
4925 AddMethodToGlobalPool(Method, impl,
false);
4935 bool receiverIdOrClass=
false) {
4936 return LookupMethodInGlobalPool(Sel, R, receiverIdOrClass,
4943 bool receiverIdOrClass=
false) {
4944 return LookupMethodInGlobalPool(Sel, R, receiverIdOrClass,
5005 bool HasLeadingEmptyMacro =
false);
5017 S.ActOnStartOfCompoundStmt(IsStmtExpr);
5021 S.ActOnFinishOfCompoundStmt();
5063 class ConditionResult;
5075 ConditionResult Cond,
5089 ConditionResult Second,
5144 unsigned OpenMPCaptureLevel = 0);
5149 unsigned NumParams);
5169 const NamedReturnInfo &NRInfo,
Expr *
Value,
5170 bool SupressSimplerImplicitMoves =
false);
5175 bool AllowRecovery =
false);
5177 NamedReturnInfo &NRInfo,
5178 bool SupressSimplerImplicitMoves);
5181 bool IsVolatile,
unsigned NumOutputs,
5189 llvm::InlineAsmIdentifierInfo &Info);
5193 bool IsUnevaluatedContext);
5200 StringRef AsmString,
5201 unsigned NumOutputs,
unsigned NumInputs,
5213 bool Invalid =
false);
5290 const Stmt *PossibleBody);
5311 ParsingClassDepth++;
5315 ParsingClassDepth--;
5323 bool ObjCPropertyAccess,
5324 bool AvoidPartialAvailabilityChecks =
false,
5328 UnavailableAttr::ImplicitReason reason);
5341 bool ObjCPropertyAccess =
false,
5342 bool AvoidPartialAvailabilityChecks =
false,
5388 bool MightBeOdrUse =
true);
5394 unsigned CapturingScopeIndex);
5440 const unsigned *
const FunctionScopeIndexToStopAt);
5459 bool SkipLocalVariables =
false,
5466 bool ForceComplain =
false,
5467 bool (*IsPlausibleResult)(
QualType) =
nullptr);
5508 bool IsInlineAsmIdentifier =
false,
Token *KeywordReplacement =
nullptr);
5529 bool AllowBuiltinCreation=
false);
5534 bool isAddressOfOperand,
5565 Expr *baseObjectExpr =
nullptr,
5576 bool IsDefiniteInstance,
5580 bool HasTrailingLParen);
5585 bool IsAddressOfOperand,
const Scope *S,
5596 bool AcceptInvalidDecl =
false);
5601 bool AcceptInvalidDecl =
false);
5634 Scope *UDLScope =
nullptr);
5643 Scope *UDLScope =
nullptr);
5648 Expr *ControllingExpr,
5654 Expr *ControllingExpr,
5678 bool IsType,
void *TyOrEx,
5758 bool SuppressQualifierCheck =
false,
5793 bool HadMultipleCandidates,
5801 bool HadMultipleCandidates,
5812 bool ExecConfig =
false);
5815 const Expr *ArgExpr);
5822 Expr *ExecConfig =
nullptr);
5825 Expr *ExecConfig =
nullptr,
5826 bool IsExecConfig =
false,
5827 bool AllowRecovery =
false);
5839 Expr *Config =
nullptr,
bool IsExecConfig =
false,
6064 llvm::SmallBitVector FullyCheckedComparisonCategories;
6132 bool HasTypenameKeyword,
6148 bool IsUsingIfExists);
6187 bool HadMultipleCandidates,
bool IsListInitialization,
6188 bool IsStdInitListInitialization,
6189 bool RequiresZeroInit,
unsigned ConstructKind,
6198 bool HadMultipleCandidates,
bool IsListInitialization,
6199 bool IsStdInitListInitialization,
6200 bool RequiresZeroInit,
unsigned ConstructKind,
6210 bool IsListInitialization,
6211 bool IsStdInitListInitialization,
bool RequiresZeroInit,
6247 void ClearExceptions() {
6248 ExceptionsSeen.clear();
6262 "noexcept(expr) should not be a possible result");
6267 unsigned size()
const {
return Exceptions.size(); }
6294 tok::kw_false).
get();
6331 Expr *NoexceptExpr);
6333 class InheritedConstructorInfo;
6338 InheritedConstructorInfo *ICI =
nullptr,
6339 bool Diagnose =
false);
6473 bool AllowExplicit =
false,
6474 bool IsListInitialization =
false);
6482 bool EnteringContext);
6487 bool EnteringContext);
6608 bool Enabled =
true);
6629 bool BuildAndDiagnose =
true,
6630 const unsigned *
const FunctionScopeIndexToStopAt =
nullptr,
6631 bool ByCopy =
false);
6655 bool IsThrownVarInScope);
6666 bool ListInitialization);
6672 bool ListInitialization);
6725 bool Diagnose =
true);
6732 bool Diagnose =
true);
6734 bool CanProvideSize,
6742 bool UseGlobal,
bool ArrayForm,
6745 bool IsDelete,
bool CallCanBeVirtual,
6746 bool WarnOnNonAbstractTypes,
6793 bool &MayBePseudoDestructor);
6828 bool BoundToLvalueReference);
6835 bool DiscardedValue,
bool IsConstexpr =
false);
6846 bool EnteringContext =
false);
6874 bool *CanCorrect =
nullptr);
6897 CCLoc(ColonColonLoc) {
6908 NestedNameSpecInfo &IdInfo);
6911 NestedNameSpecInfo &IdInfo,
6912 bool EnteringContext,
6915 bool ErrorRecoveryLookup,
6916 bool *IsCorrectedToColon =
nullptr,
6917 bool OnlyNamespace =
false);
6945 NestedNameSpecInfo &IdInfo,
6946 bool EnteringContext,
6948 bool ErrorRecoveryLookup =
false,
6949 bool *IsCorrectedToColon =
nullptr,
6950 bool OnlyNamespace =
false);
6959 NestedNameSpecInfo &IdInfo,
6960 bool EnteringContext);
6994 bool EnteringContext);
7051 unsigned LambdaDependencyKind,
7061 Expr *TrailingRequiresClause);
7066 Optional<std::tuple<bool, unsigned, unsigned, Decl *>> Mangling = None);
7074 bool ExplicitParams,
7075 bool ExplicitResultType,
7085 Loc, ByRef, EllipsisLoc, None,
Id,
7102 unsigned InitStyle,
Expr *Init);
7137 bool IsInstantiation =
false);
7158 bool IsOpenMPMapping =
false);
7201 bool *PossibleNonPrimary =
nullptr,
7202 bool IsTrailingRequiresClause =
false);
7208 llvm::DenseMap<std::pair<NamedDecl *, NamedDecl *>,
bool> SubsumptionCache;
7213 llvm::DenseMap<NamedDecl *, NormalizedConstraint *>
7216 llvm::ContextualFoldingSet<ConstraintSatisfaction, const ASTContext &>
7222 bool addInstantiatedParametersToScope(
7356 bool HadMultipleCandidates);
7370 bool WarnMultipleSelectors);
7482 llvm::SmallPtrSetImpl<const RecordType *> *DirectVirtualBases =
nullptr);
7495 typedef std::pair<CXXRecordDecl*, SourceLocation>
VTableUse;
7513 bool DefinitionRequired =
false);
7523 bool ConstexprOnly =
false);
7578 llvm::function_ref<
Scope *()> EnterScope);
7592 Expr *AssertMessageExpr,
7666 bool IgnoreAccess =
false);
7668 unsigned InaccessibleBaseID,
7669 unsigned AmbiguousBaseConvID,
7673 bool IgnoreAccess =
false);
7733 bool Diagnose =
true);
7738 bool IsCopyBindingRefToTemp =
false);
7772 bool ForceCheck =
false,
7773 bool ForceUnprivileged =
false);
7812 TypeDiagnoser &Diagnoser);
7813 template <
typename... Ts>
7815 const Ts &...Args) {
7834 bool AllowFunctionTemplates =
true,
7835 bool AllowDependent =
true);
7837 bool AllowFunctionTemplates =
true,
7838 bool AllowDependent =
true,
7839 bool AllowNonTemplateFunctions =
false);
7848 bool AllowFunctionTemplates =
true,
7849 bool AllowDependent =
true);
7857 : TemplateKW(TemplateKWLoc) {}
7883 bool EnteringContext,
bool &MemberOfUnknownSpecialization,
7889 bool hasTemplateKeyword,
7892 bool EnteringContext,
7894 bool &MemberOfUnknownSpecialization,
7895 bool Disambiguation =
false);
7909 bool Diagnose =
true);
7926 bool InstantiatedFromMember,
7930 bool Complain =
true);
7940 unsigned Depth,
unsigned Position,
7942 ParsedType DefaultArg,
bool HasTypeConstraint);
7952 bool AllowUnexpandedPack);
7994 Expr *RequiresClause);
8011 SkipBodyInfo *SkipBody =
nullptr);
8016 bool IsFriend,
bool &IsMemberSpecialization,
bool &Invalid,
8017 bool SuppressDiagnostic =
false);
8026 SkipBodyInfo *SkipBody =
nullptr);
8054 bool IsCtorOrDtorName =
false,
bool IsClassName =
false);
8114 TemplateTy &Template,
bool AllowInjectedClassName =
false);
8121 SkipBodyInfo *SkipBody =
nullptr);
8125 unsigned NumExplicitArgs,
8180 bool &HasDefaultArg);
8203 unsigned ArgumentPackIndex,
8239 bool PartialTemplateArgs,
8241 bool UpdateArgsWithConversions =
true,
8242 bool *ConstraintsNotSatisfied =
nullptr);
8352 bool DeducedTSTContext);
8359 bool DeducedTSTContext =
true);
8736 bool &RetainExpansion,
8796 bool AdjustExceptionSpec =
false);
8897 unsigned NumExplicitlySpecified,
FunctionDecl *&Specialization,
8900 bool PartialOverloading =
false,
8901 llvm::function_ref<
bool()> CheckNonDependent = []{
return false; });
8907 bool PartialOverloading,
8916 bool IsAddressOfFunction =
false);
8929 bool IsAddressOfFunction =
false);
8960 bool IgnoreConstraints =
false);
8964 bool IgnoreConstraints =
false);
8967 bool Diagnose =
true);
8992 unsigned NumCallArguments2,
bool Reversed =
false);
9022 unsigned Depth, llvm::SmallBitVector &Used);
9027 llvm::SmallBitVector &Used);
9030 llvm::SmallBitVector &Deduced) {
9035 llvm::SmallBitVector &Deduced);
9043 bool RelativeToPrimary =
false,
const FunctionDecl *Pattern =
nullptr);
9258 std::vector<std::unique_ptr<TemplateInstantiationCallback>>
9275 int OldSubstitutionIndex;
9295 typedef llvm::DenseMap<Decl *, SmallVector<PartialDiagnosticAt, 1> >
9458 bool AlreadyInstantiating;
9459 bool CheckInstantiationDepth(
SourceLocation PointOfInstantiation,
9510 "Must be in an expression evaluation context");
9516 "Must be in an expression evaluation context");
9525 unsigned PrevSFINAEErrors;
9526 bool PrevInNonInstantiationSFINAEContext;
9527 bool PrevAccessCheckingSFINAE;
9528 bool PrevLastDiagnosticIgnored;
9533 PrevInNonInstantiationSFINAEContext(
9536 PrevLastDiagnosticIgnored(
9547 = PrevInNonInstantiationSFINAEContext;
9550 PrevLastDiagnosticIgnored);
9567 bool PrevDisableTypoCorrection;
9570 : SemaRef(SemaRef), Trap(SemaRef,
true),
9623 : S(S), Enabled(Enabled) {
9624 if (!Enabled)
return;
9626 SavedPendingInstantiations.swap(S.PendingInstantiations);
9627 SavedVTableUses.swap(S.VTableUses);
9632 S.DefineUsedVTables();
9633 S.PerformPendingInstantiations();
9638 if (!Enabled)
return;
9641 assert(S.VTableUses.empty() &&
9642 "VTableUses should be empty before it is discarded.");
9643 S.VTableUses.swap(SavedVTableUses);
9646 if (S.TUKind !=
TU_Prefix || !S.LangOpts.PCHInstantiateTemplates) {
9647 assert(S.PendingInstantiations.empty() &&
9648 "PendingInstantiations should be empty before it is discarded.");
9649 S.PendingInstantiations.swap(SavedPendingInstantiations);
9652 S.PendingInstantiations.swap(SavedPendingInstantiations);
9653 S.PendingInstantiations.insert(S.PendingInstantiations.end(),
9654 SavedPendingInstantiations.begin(),
9655 SavedPendingInstantiations.end());
9662 std::deque<PendingImplicitInstantiation> SavedPendingInstantiations;
9678 SavedPendingLocalImplicitInstantiations.swap(
9679 S.PendingLocalImplicitInstantiations);
9682 void perform() { S.PerformPendingInstantiations(
true); }
9685 assert(S.PendingLocalImplicitInstantiations.empty() &&
9686 "there shouldn't be any pending local implicit instantiations");
9687 SavedPendingLocalImplicitInstantiations.swap(
9688 S.PendingLocalImplicitInstantiations);
9693 std::deque<PendingImplicitInstantiation>
9694 SavedPendingLocalImplicitInstantiations;
9700 bool HasInteresting =
false;
9705 void set(
unsigned index, FunctionProtoType::ExtParameterInfo info) {
9706 assert(Infos.size() <= index);
9707 Infos.resize(index);
9708 Infos.push_back(info);
9710 if (!HasInteresting)
9711 HasInteresting = (info != FunctionProtoType::ExtParameterInfo());
9718 if (!HasInteresting)
return nullptr;
9719 Infos.resize(numParams);
9720 return Infos.data();
9729 bool AllowDeducedTST =
false);
9753 int indexAdjustment,
9755 bool ExpectParameterPack);
9761 ExtParameterInfoBuilder &ParamInfos);
9805 bool CXXDirectInit);
9817 bool Complain =
true);
9860 bool Complain =
true);
9900 bool Recursive =
false,
9901 bool DefinitionRequired =
false,
9902 bool AtEndOfTU =
false);
9920 bool InstantiatingVarTemplate =
false,
9927 VarDecl *Var,
bool Recursive =
false,
9928 bool DefinitionRequired =
false,
9929 bool AtEndOfTU =
false);
9937 bool FindingInstantiatedContext =
false);
9972 Decl *
const *ProtoRefs,
unsigned NumProtoRefs,
10011 Decl *
const *ProtoRefs,
unsigned NumProtoRefs,
10051 bool SelectProtocolFirst =
false);
10069 bool warnOnIncompleteProtocols);
10098 bool FailOnError =
false);
10110 bool FailOnError =
false);
10117 unsigned &Attributes,
10118 bool propertyInPrimaryClass);
10129 bool OverridingProtocolProperty);
10186 bool isVariadic,
bool MethodDefinition);
10232 bool HasTrailingDot,
10251 bool isImplicit =
false);
10254 bool isSuperReceiver,
10277 bool isImplicit =
false);
10321 bool CfToNs,
bool Diagnose =
true);
10325 Expr *&SrcExpr,
bool Diagnose =
true);
10328 bool Diagnose =
true);
10371 StringRef SlotLabel,
Expr *Alignment);
10409 bool UnifySection(StringRef SectionName,
int SectionFlags,
10418 llvm::StringRef StackSlotLabel,
10420 llvm::StringRef PragmaName);
10572 Expr **Exprs,
unsigned Size);
10575 WorkGroupSizeHintAttr *
10579 IntelReqdSubGroupSizeAttr *
10581 IntelNamedSubGroupSizeAttr *
10585 SYCLIntelNumSimdWorkItemsAttr *
10587 const SYCLIntelNumSimdWorkItemsAttr &A);
10590 SYCLIntelESimdVectorizeAttr *
10592 const SYCLIntelESimdVectorizeAttr &A);
10597 Decl *D,
const SYCLIntelSchedulerTargetFmaxMhzAttr &A);
10602 Decl *D,
const SYCLIntelNoGlobalWorkOffsetAttr &A);
10605 SYCLIntelLoopFuseAttr *
10611 IntelFPGAMaxReplicatesAttr *
10615 IntelFPGAForcePow2DepthAttr *
10617 const IntelFPGAForcePow2DepthAttr &A);
10622 Decl *D,
const SYCLIntelFPGAInitiationIntervalAttr &A);
10625 Decl *D,
const SYCLIntelFPGAMaxConcurrencyAttr &A);
10628 SYCLIntelMaxGlobalWorkDimAttr *
10630 const SYCLIntelMaxGlobalWorkDimAttr &A);
10633 IntelFPGABankWidthAttr *
10637 IntelFPGANumBanksAttr *
10640 const SYCLDeviceHasAttr &A);
10642 Expr **Exprs,
unsigned Size);
10644 const SYCLUsesAspectsAttr &A);
10646 Expr **Exprs,
unsigned Size);
10649 SYCLIntelMaxWorkGroupSizeAttr *
10651 const SYCLIntelMaxWorkGroupSizeAttr &A);
10653 Decl *D,
const SYCLAddIRAttributesFunctionAttr &A);
10657 SYCLAddIRAttributesKernelParameterAttr *
10659 Decl *D,
const SYCLAddIRAttributesKernelParameterAttr &A);
10663 SYCLAddIRAttributesGlobalVariableAttr *
10665 Decl *D,
const SYCLAddIRAttributesGlobalVariableAttr &A);
10671 ReqdWorkGroupSizeAttr *
10675 bool IsPackExpansion);
10677 bool IsPackExpansion);
10700 Expr *MaxThreads,
Expr *MinBlocks);
10704 bool InInstantiation =
false);
10727 const SYCLIntelPipeIOAttr &A);
10741 StringRef Keyword);
10747 bool IsImplicit =
false);
10752 bool IsImplicit =
false);
10770 void *VarDataSharingAttributesStack;
10772 struct DeclareTargetContextInfo {
10774 OMPDeclareTargetDeclAttr::MapTypeTy
MT;
10778 llvm::DenseMap<NamedDecl *, MapInfo> ExplicitlyMapped;
10781 OMPDeclareTargetDeclAttr::DevTypeTy DT = OMPDeclareTargetDeclAttr::DT_Any;
10800 void InitDataSharingAttributesStack();
10801 void DestroyDataSharingAttributesStack();
10804 bool StrictlyPositive =
true,
10805 bool SuppressExprDiags =
false);
10807 unsigned getOpenMPNestingLevel()
const;
10810 void adjustOpenMPTargetScopeIndex(
unsigned &FunctionScopesIndex,
10811 unsigned Level)
const;
10815 int getNumberOfConstructScopes(
unsigned Level)
const;
10818 void pushOpenMPFunctionRegion();
10835 bool checkTransformableLoopNest(
10844 struct OMPDeclareVariantScope {
10855 OMPTraitInfo *getOMPTraitInfoForSurroundingScope() {
10856 return OMPDeclareVariantScopes.empty() ? nullptr
10857 : OMPDeclareVariantScopes.back().TI;
10861 SmallVector<OMPDeclareVariantScope, 4> OMPDeclareVariantScopes;
10864 SmallVector<AssumptionAttr *, 4> OMPAssumeScoped;
10867 SmallVector<AssumptionAttr *, 4> OMPAssumeGlobal;
10876 SmallVectorImpl<FunctionDecl *> &Bases);
10881 Decl *D, SmallVectorImpl<FunctionDecl *> &Bases);
10888 return !OMPDeclareVariantScopes.empty();
10912 bool ConstexprSupported,
bool CLinkageMayDiffer);
10924 unsigned OpenMPCaptureLevel)
const;
10930 unsigned StopAt = 0);
10946 unsigned CapLevel)
const;
10957 unsigned CaptureLevel)
const;
10964 unsigned CaptureLevel)
const;
11014 bool SkippedClauses);
11038 ArrayRef<std::pair<QualType, SourceLocation>> ReductionTypes,
11065 Decl *PrevDeclInScope =
nullptr);
11094 OMPDeclareTargetDeclAttr::MapTypeTy MT,
11095 DeclareTargetContextInfo &DTCI);
11112 return !DeclareTargetNesting.empty();
11150 llvm::SmallDenseMap<const ValueDecl *, const Expr *, 4>;
11476 bool IsDeclareSimd =
false);
11583 Expr *NumForLoops =
nullptr);
11692 bool IsTarget,
bool IsTargetSync,
12006 bool Diagnose =
true);
12062 bool checkMustTailAttr(
const Stmt *St,
const Attr &MTA);
12075 bool AllowExplicit =
false,
12076 bool IsListInitialization =
false);
12195 bool *Complained =
nullptr);
12201 bool AllowMask)
const;
12221 bool ConvertRHS =
true);
12239 bool DiagnoseCFAudited =
false,
bool ConvertRHS =
true);
12252 bool AllowExplicit =
false);
12283 bool IsCompAssign =
false);
12327 bool ConvertArgs =
true);
12330 bool ConvertArgs =
true) {
12352 bool AllowBothBool,
bool AllowBoolConversion,
12353 bool AllowBoolOperation,
bool ReportInvalid);
12369 bool IsCompAssign);
12474 bool Diagnose =
true,
12475 bool DiagnoseCFAudited =
false,
12516 bool isSuperMessage);
12528 Decl *ConditionVar;
12531 bool HasKnownValue;
12540 KnownValue(HasKnownValue &&
12549 std::pair<VarDecl *, Expr *>
get()
const {
12550 return std::make_pair(cast_or_null<VarDecl>(ConditionVar),
12554 if (!HasKnownValue)
12593 bool IsConstexpr =
false);
12618 unsigned NewWidth,
bool NewSign,
12651 VerifyICEDiagnoser &Diagnoser,
12669 QualType FieldTy,
bool IsMsStruct,
12670 Expr *BitWidth,
bool *ZeroWidth =
nullptr);
12673 unsigned ForceCUDAHostDeviceDepth = 0;
12703 llvm::DenseMap<CanonicalDeclPtr<FunctionDecl>,
12704 std::vector<DeviceDeferredDiagnostic>>
12814 bool IgnoreImplicitHDAttr =
false);
12906 SmallVectorImpl<std::pair<DeclAccessPair, FunctionDecl *>> &Matches);
13004 bool AllowNonIdentifiers,
13005 bool AllowNestedNameSpecifiers);
13007 struct CodeCompleteExpressionData;
13009 const CodeCompleteExpressionData &Data);
13011 bool IsParenthesized =
false);
13014 bool IsBaseExprStatement,
13063 bool IsUsingDeclaration,
QualType BaseType,
13075 bool AfterAmpersand);
13090 bool AtArgumentExpression);
13093 bool AtArgumentExpression,
13094 bool IsSuper =
false);
13097 bool AtArgumentExpression,
13123 bool IsInstanceMethod,
13124 bool AtParameterName,
13129 bool IsBaseExprStatement);
13137 unsigned Argument);
13151 unsigned ByteNo)
const;
13154 void CheckArrayAccess(
const Expr *BaseExpr,
const Expr *IndexExpr,
13156 bool AllowOnePastEnd=
true,
bool IndexNegated=
false);
13157 void CheckArrayAccess(
const Expr *E);
13160 struct FormatStringInfo {
13161 unsigned FormatIdx;
13162 unsigned FirstDataArg;
13166 static bool getFormatStringInfo(
const FormatAttr *Format,
bool IsCXXMember,
13167 FormatStringInfo *FSI);
13168 bool CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall,
13169 const FunctionProtoType *Proto);
13170 bool CheckObjCMethodCall(ObjCMethodDecl *Method, SourceLocation loc,
13171 ArrayRef<const Expr *> Args);
13172 bool CheckPointerCall(NamedDecl *NDecl, CallExpr *TheCall,
13173 const FunctionProtoType *Proto);
13174 bool CheckOtherCall(CallExpr *TheCall,
const FunctionProtoType *Proto);
13175 void CheckConstructorCall(FunctionDecl *FDecl, QualType ThisType,
13176 ArrayRef<const Expr *> Args,
13177 const FunctionProtoType *Proto, SourceLocation Loc);
13179 void CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl,
13180 StringRef ParamName, QualType ArgTy, QualType ParamTy);
13182 void checkCall(NamedDecl *FDecl,
const FunctionProtoType *Proto,
13183 const Expr *ThisArg, ArrayRef<const Expr *> Args,
13184 bool IsMemberFunction, SourceLocation Loc, SourceRange Range,
13187 void CheckSYCLKernelCall(FunctionDecl *CallerFunc, SourceRange CallLoc,
13188 ArrayRef<const Expr *> Args);
13190 bool CheckObjCString(Expr *Arg);
13191 ExprResult CheckOSLogFormatStringArg(Expr *Arg);
13193 ExprResult CheckBuiltinFunctionCall(FunctionDecl *FDecl,
13194 unsigned BuiltinID, CallExpr *TheCall);
13196 bool CheckTSBuiltinFunctionCall(
const TargetInfo &TI,
unsigned BuiltinID,
13197 CallExpr *TheCall);
13199 void checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD, CallExpr *TheCall);
13201 bool CheckARMBuiltinExclusiveCall(
unsigned BuiltinID, CallExpr *TheCall,
13202 unsigned MaxWidth);
13203 bool CheckNeonBuiltinFunctionCall(
const TargetInfo &TI,
unsigned BuiltinID,
13204 CallExpr *TheCall);
13205 bool CheckMVEBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
13206 bool CheckSVEBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
13207 bool CheckCDEBuiltinFunctionCall(
const TargetInfo &TI,
unsigned BuiltinID,
13208 CallExpr *TheCall);
13209 bool CheckARMCoprocessorImmediate(
const TargetInfo &TI,
const Expr *CoprocArg,
13211 bool CheckARMBuiltinFunctionCall(
const TargetInfo &TI,
unsigned BuiltinID,
13212 CallExpr *TheCall);
13214 bool CheckAArch64BuiltinFunctionCall(
const TargetInfo &TI,
unsigned BuiltinID,
13215 CallExpr *TheCall);
13216 bool CheckBPFBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
13217 bool CheckHexagonBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
13218 bool CheckHexagonBuiltinArgument(
unsigned BuiltinID, CallExpr *TheCall);
13219 bool CheckMipsBuiltinFunctionCall(
const TargetInfo &TI,
unsigned BuiltinID,
13220 CallExpr *TheCall);
13221 bool CheckMipsBuiltinCpu(
const TargetInfo &TI,
unsigned BuiltinID,
13222 CallExpr *TheCall);
13223 bool CheckMipsBuiltinArgument(
unsigned BuiltinID, CallExpr *TheCall);
13224 bool CheckSystemZBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
13225 bool CheckX86BuiltinRoundingOrSAE(
unsigned BuiltinID, CallExpr *TheCall);
13226 bool CheckX86BuiltinGatherScatterScale(
unsigned BuiltinID, CallExpr *TheCall);
13227 bool CheckX86BuiltinTileArguments(
unsigned BuiltinID, CallExpr *TheCall);
13228 bool CheckX86BuiltinTileArgumentsRange(CallExpr *TheCall,
13229 ArrayRef<int> ArgNums);
13230 bool CheckX86BuiltinTileDuplicate(CallExpr *TheCall, ArrayRef<int> ArgNums);
13231 bool CheckX86BuiltinTileRangeAndDuplicate(CallExpr *TheCall,
13232 ArrayRef<int> ArgNums);
13233 bool CheckX86BuiltinFunctionCall(
const TargetInfo &TI,
unsigned BuiltinID,
13234 CallExpr *TheCall);
13235 bool CheckPPCBuiltinFunctionCall(
const TargetInfo &TI,
unsigned BuiltinID,
13236 CallExpr *TheCall);
13237 bool CheckAMDGCNBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *TheCall);
13238 bool CheckRISCVLMUL(CallExpr *TheCall,
unsigned ArgNum);
13239 bool CheckRISCVBuiltinFunctionCall(
const TargetInfo &TI,
unsigned BuiltinID,
13240 CallExpr *TheCall);
13242 bool CheckIntelFPGARegBuiltinFunctionCall(
unsigned BuiltinID, CallExpr *Call);
13243 bool CheckIntelFPGAMemBuiltinFunctionCall(CallExpr *Call);
13245 bool SemaBuiltinVAStart(
unsigned BuiltinID, CallExpr *TheCall);
13246 bool SemaBuiltinVAStartARMMicrosoft(CallExpr *Call);
13247 bool SemaBuiltinUnorderedCompare(CallExpr *TheCall);
13248 bool SemaBuiltinFPClassification(CallExpr *TheCall,
unsigned NumArgs);
13249 bool SemaBuiltinComplex(CallExpr *TheCall);
13250 bool SemaBuiltinVSX(CallExpr *TheCall);
13251 bool SemaBuiltinOSLogFormat(CallExpr *TheCall);
13252 bool SemaValueIsRunOfOnes(CallExpr *TheCall,
unsigned ArgNum);
13258 SourceLocation BuiltinLoc,
13259 SourceLocation RParenLoc);
13261 template <
typename AttrTy>
13266 if (
auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RecTy)) {
13269 return RD->
hasAttr<AttrTy>();
13271 return RecTy->
hasAttr<AttrTy>();
13275 bool SemaBuiltinPrefetch(
CallExpr *TheCall);
13276 bool SemaBuiltinAllocaWithAlign(
CallExpr *TheCall);
13277 bool SemaBuiltinArithmeticFence(
CallExpr *TheCall);
13278 bool SemaBuiltinAssume(
CallExpr *TheCall);
13279 bool SemaBuiltinAssumeAligned(
CallExpr *TheCall);
13280 bool SemaBuiltinLongjmp(
CallExpr *TheCall);
13281 bool SemaBuiltinSetjmp(
CallExpr *TheCall);
13288 bool SemaBuiltinConstantArg(
CallExpr *TheCall,
int ArgNum,
13290 bool SemaBuiltinConstantArgRange(
CallExpr *TheCall,
int ArgNum,
int Low,
13291 int High,
bool RangeIsError =
true);
13292 bool SemaBuiltinConstantArgMultiple(
CallExpr *TheCall,
int ArgNum,
13293 unsigned Multiple);
13294 bool SemaBuiltinConstantArgPower2(
CallExpr *TheCall,
int ArgNum);
13295 bool SemaBuiltinConstantArgShiftedByte(
CallExpr *TheCall,
int ArgNum,
13297 bool SemaBuiltinConstantArgShiftedByteOrXXFF(
CallExpr *TheCall,
int ArgNum,
13299 bool SemaBuiltinARMSpecialReg(
unsigned BuiltinID,
CallExpr *TheCall,
13300 int ArgNum,
unsigned ExpectedFieldNum,
13302 bool SemaBuiltinARMMemoryTaggingCall(
unsigned BuiltinID,
CallExpr *TheCall);
13303 bool SemaBuiltinPPCMMACall(
CallExpr *TheCall,
unsigned BuiltinID,
13304 const char *TypeDesc);
13308 bool SemaBuiltinElementwiseMath(
CallExpr *TheCall);
13309 bool PrepareBuiltinElementwiseMathOneArgCall(
CallExpr *TheCall);
13310 bool PrepareBuiltinReduceMathOneArgCall(
CallExpr *TheCall);
13340 bool CheckFormatArguments(
const FormatAttr *Format,
13345 llvm::SmallBitVector &CheckedVarArgs);
13347 bool HasVAListArg,
unsigned format_idx,
13351 llvm::SmallBitVector &CheckedVarArgs);
13353 void CheckAbsoluteValueFunction(
const CallExpr *Call,
13358 void CheckMemaccessArguments(
const CallExpr *Call,
13362 void CheckStrlcpycatArguments(
const CallExpr *Call,
13365 void CheckStrncatArguments(
const CallExpr *Call,
13368 void CheckFreeArguments(
const CallExpr *E);
13370 void CheckReturnValExpr(
Expr *RetValExp,
QualType lhsType,
13372 bool isObjCMethod =
false,
13373 const AttrVec *Attrs =
nullptr,
13383 void CheckForIntOverflow(
Expr *E);
13384 void CheckUnsequencedOperations(
const Expr *E);
13389 bool IsConstexpr =
false);
13398 bool DeclIsField =
true);
13402 void CheckBreakContinueBinding(
Expr *E);
13412 bool DeleteWasArrayForm);
13417 bool LayoutCompatible,
bool MustBeNull);
13441 std::unique_ptr<llvm::DenseMap<TypeTagMagicValue, TypeTagData>>
13442 TypeTagForDatatypeMagicValues;
13446 void CheckArgumentWithTypeTag(
const ArgumentWithTypeTagAttr *
Attr,
13452 void CheckAddressOfPackedMember(
Expr *rhs);
13521 DC = CatD->getClassInterface();
13535 bool PartialOverloading =
false) {
13537 if (NumArgs > 0 && PartialOverloading)
13538 return NumArgs + 1 > NumParams;
13539 return NumArgs > NumParams;
13548 int ParsingClassDepth = 0;
13550 class SavePendingParsedClassStateRAII {
13552 SavePendingParsedClassStateRAII(
Sema &S) : S(S) { swapSavedState(); }
13554 ~SavePendingParsedClassStateRAII() {
13555 assert(S.DelayedOverridingExceptionSpecChecks.empty() &&
13556 "there shouldn't be any pending delayed exception spec checks");
13557 assert(S.DelayedEquivalentExceptionSpecChecks.empty() &&
13558 "there shouldn't be any pending delayed exception spec checks");
13565 SavedOverridingExceptionSpecChecks;
13567 SavedEquivalentExceptionSpecChecks;
13569 void swapSavedState() {
13570 SavedOverridingExceptionSpecChecks.swap(
13571 S.DelayedOverridingExceptionSpecChecks);
13572 SavedEquivalentExceptionSpecChecks.swap(
13573 S.DelayedEquivalentExceptionSpecChecks);
13579 struct MisalignedMember {
13585 MisalignedMember() : E(), RD(), MD() {}
13586 MisalignedMember(Expr *E, RecordDecl *RD, ValueDecl *MD,
13587 CharUnits Alignment)
13588 : E(E), RD(RD), MD(MD), Alignment(Alignment) {}
13589 explicit MisalignedMember(Expr *E)
13590 : MisalignedMember(E, nullptr, nullptr, CharUnits()) {}
13592 bool operator==(
const MisalignedMember &m) {
return this->E == m.E; }
13596 SmallVector<MisalignedMember, 4> MisalignedMembers;
13599 void AddPotentialMisalignedMembers(Expr *E, RecordDecl *RD, ValueDecl *MD,
13600 CharUnits Alignment);
13620 llvm::function_ref<
void(Expr *, RecordDecl *, FieldDecl *, CharUnits)>
13635 llvm::SetVector<Decl *> SyclDeviceDecls;
13638 std::unique_ptr<SYCLIntegrationHeader> SyclIntHeader;
13639 std::unique_ptr<SYCLIntegrationFooter> SyclIntFooter;
13645 SyclKernelsToOpenCLKernels;
13650 bool DiagnosingSYCLKernel =
false;
13655 SyclKernelsToOpenCLKernels.emplace_back(SyclKernel, OpenCLKernel);
13663 if (SyclIntHeader ==
nullptr)
13664 SyclIntHeader = std::make_unique<SYCLIntegrationHeader>(*
this);
13665 return *SyclIntHeader.get();
13669 if (SyclIntFooter ==
nullptr)
13670 SyclIntFooter = std::make_unique<SYCLIntegrationFooter>(*
this);
13671 return *SyclIntFooter.get();
13727 StringRef NewName);
13732 StringRef NewName =
"");
13794 bool Entered =
true;
13799 Decl *LambdaContextDecl =
nullptr,
13802 bool ShouldEnter =
true)
13803 : Actions(Actions), Entered(ShouldEnter) {
13813 : Actions(Actions) {
13820 bool ShouldEnter =
true)
13821 : Actions(Actions), Entered(
false) {
13840 DeductionFailureInfo
13842 sema::TemplateDeductionInfo &Info);
13854 PragmaMsStackAction Action,
13855 llvm::StringRef StackSlotLabel,
13856 AlignPackInfo
Value);
13863 template <>
struct DenseMapInfo<
clang::Sema::FunctionDeclAndLoc> {
13865 using FDBaseInfo = DenseMapInfo<clang::CanonicalDeclPtr<clang::FunctionDecl>>;
13882 return LHS.
FD == RHS.
FD && LHS.
Loc == RHS.
Loc;
ExprResult ActOnSuperMessage(Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
IntelNamedSubGroupSizeAttr * MergeIntelNamedSubGroupSizeAttr(Decl *D, const IntelNamedSubGroupSizeAttr &A)
DelayedDiagnosticsState pushUndelayed()
Enter a new scope where access and deprecation diagnostics are not delayed.
DeclResult ActOnCXXConditionDeclaration(Scope *S, Declarator &D)
ActOnCXXConditionDeclarationExpr - Parsed a condition declaration of a C++ if/switch/while/for statem...
OMPClause * ActOnOpenMPDepobjClause(Expr *Depobj, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'depobj' pseudo clause.
QualType BuildObjCObjectType(QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc, ArrayRef< TypeSourceInfo * > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false)
Build an Objective-C object pointer type.
void InstantiateAttrsForDecl(const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
void CodeCompleteObjCSuperclass(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void finishLambdaExplicitCaptures(sema::LambdaScopeInfo *LSI)
Note that we have finished the explicit captures for the given lambda.
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
bool CheckConversionToObjCLiteral(QualType DstType, Expr *&SrcExpr, bool Diagnose=true)
Store information needed for an explicit specifier.
OpenMPDeviceClauseModifier
OpenMP modifiers for 'device' clause.
bool isCopyElidable() const
StmtResult ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt)
QualType CheckVectorLogicalOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc)
static SourceRange getPrintable(SourceLocation L)
@ NTK_TemplateTemplateArgument
void ActOnOpenMPDeclareReductionCombinerStart(Scope *S, Decl *D)
Initialize declare reduction construct initializer.
OMPClause * ActOnOpenMPOrderedClause(SourceLocation StartLoc, SourceLocation EndLoc, SourceLocation LParenLoc=SourceLocation(), Expr *NumForLoops=nullptr)
Called on well-formed 'ordered' clause.
bool isTypeDecoratedWithDeclAttribute(QualType Ty)
void CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, const LookupResult &R)
Diagnose variable or built-in function shadowing.
bool hasAnyUnrecoverableErrorsInThisFunction() const
Determine whether any errors occurred within this function/method/ block.
DeclResult ActOnModuleImport(SourceLocation StartLoc, SourceLocation ExportLoc, SourceLocation ImportLoc, ModuleIdPath Path, bool IsPartition=false)
The parser has processed a module import declaration.
IntelFPGABankWidthAttr * MergeIntelFPGABankWidthAttr(Decl *D, const IntelFPGABankWidthAttr &A)
@ IER_Error
An error occurred.
static SourceRange getPrintable(TypeLoc TL)
Represents a C++ unqualified-id that has been parsed.
Represents an ObjC class declaration.
SpecialMemberOverloadResult - The overloading result for a special member function.
void DiagnoseEqualityWithExtraParens(ParenExpr *ParenE)
Redundant parentheses over an equality comparison can indicate that the user intended an assignment u...
bool resolveAssumedTemplateNameAsType(Scope *S, TemplateName &Name, SourceLocation NameLoc, bool Diagnose=true)
A normalized constraint, as defined in C++ [temp.constr.normal], is either an atomic constraint,...
@ PCC_ObjCInterface
Code completion occurs within an Objective-C interface, protocol, or category.
@ TDK_Inconsistent
Template argument deduction produced inconsistent deduced values for the given template parameter.
NonOdrUseReason
The reason why a DeclRefExpr does not constitute an odr-use.
ExprResult SemaConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
SemaConvertVectorExpr - Handle __builtin_convertvector.
LazyVector< CXXConstructorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadDelegatingConstructors, 2, 2 > DelegatingCtorDeclsType
void CheckDelayedMemberExceptionSpecs()
bool RequireCompleteSizedExprType(Expr *E, unsigned DiagID, const Ts &... Args)
bool UnifySection(StringRef SectionName, int SectionFlags, NamedDecl *TheDecl)
ExprResult BuildDeclarationNameExpr(const CXXScopeSpec &SS, LookupResult &R, bool NeedsADL, bool AcceptInvalidDecl=false)
bool isModuleDirectlyImported(const Module *M)
FunctionProtoType::ExceptionSpecInfo getExceptionSpec() const
Overwrite an EPI's exception specification with this computed exception specification.
ExprResult BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field)
DeclContext * CurContext
CurContext - This is the current declaration context of parsing.
QualType ReplaceAutoType(QualType TypeWithAuto, QualType Replacement)
Completely replace the auto in TypeWithAuto by Replacement.
TypeResult actOnObjCProtocolQualifierType(SourceLocation lAngleLoc, ArrayRef< Decl * > protocols, ArrayRef< SourceLocation > protocolLocs, SourceLocation rAngleLoc)
Build a an Objective-C protocol-qualified 'id' type where no base type was specified.
void InstantiateVariableInitializer(VarDecl *Var, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiate the initializer of a variable.
@ CCEK_ExplicitBool
Condition in an explicit(bool) specifier.
llvm::DenseMap< const VarDecl *, int > RefsMinusAssignments
Increment when we find a reference; decrement when we find an ignored assignment.
SmallVector< VTableUse, 16 > VTableUses
The list of vtables that are required but have not yet been materialized.
@ UPPC_Expression
An arbitrary expression.
SYCLIntelFPGAMaxConcurrencyAttr * BuildSYCLIntelFPGAMaxConcurrencyAttr(const AttributeCommonInfo &CI, Expr *E)
ExprResult DefaultArgumentPromotion(Expr *E)
DefaultArgumentPromotion (C99 6.5.2.2p6).
void getUndefinedButUsed(SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &Undefined)
Obtain a sorted list of functions that are undefined but ODR-used.
ObjCBridgeCastKind
The kind of bridging performed by the Objective-C bridge cast.
bool LookupTemplateName(LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate=SourceLocation(), AssumedTemplateKind *ATK=nullptr, bool AllowTypoCorrection=true)
QualType CheckAdditionOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType *CompLHSTy=nullptr)
StmtResult ActOnOpenMPDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute' after parsing of the associated statement.
void CodeCompleteOperatorName(Scope *S)
void DiagnoseDuplicateIvars(ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID)
DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementatio...
void setFunctionHasIndirectGoto()
CaseStmt - Represent a case statement.
bool FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, AllocationFunctionScope NewScope, AllocationFunctionScope DeleteScope, QualType AllocType, bool IsArray, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose=true)
Finds the overloads of operator new and delete that are appropriate for the allocation.
DeclarationName VAListTagName
VAListTagName - The declaration name corresponding to __va_list_tag.
bool isDependentScopeSpecifier(const CXXScopeSpec &SS)
Captures information about "declaration specifiers" specific to Objective-C.
bool checkTargetAttr(SourceLocation LiteralLoc, StringRef Str)
void warnStackExhausted(SourceLocation Loc)
Warn that the stack is nearly exhausted.
@ NC_FunctionTemplate
The name was classified as a function template name.
MSInheritanceAttr * mergeMSInheritanceAttr(Decl *D, const AttributeCommonInfo &CI, bool BestCase, MSInheritanceModel Model)
DeclResult ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy Template, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, const ParsedAttributesView &Attr)
Scope * getNonFieldDeclScope(Scope *S)
getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be dec...
AvailabilityPriority
Describes the kind of priority given to an availability attribute.
TypoExpr * CorrectTypoDelayed(const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, TypoDiagnosticGenerator TDG, TypoRecoveryCallback TRC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr)
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to...
ArrayTypeTrait
Names for the array type traits.
bool diagnoseQualifiedDeclaration(CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc, bool IsTemplateId)
Diagnose a declaration whose declarator-id has the given nested-name-specifier.
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
bool isSYCLEsimdPrivateGlobal(VarDecl *VDecl)
Tells whether given variable is a SYCL explicit SIMD extension's "private global" variable - global v...
bool isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level, unsigned CaptureLevel) const
Check if the specified global variable must be captured by outer capture regions.
void makeMergedDefinitionVisible(NamedDecl *ND)
Make a merged definition of an existing hidden definition ND visible at the specified location.
DeclGroupPtrTy ActOnGlobalModuleFragmentDecl(SourceLocation ModuleLoc)
The parser has processed a global-module-fragment declaration that begins the definition of the globa...
bool isInitListConstructor(const FunctionDecl *Ctor)
Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init....
PragmaClangSection PragmaClangRelroSection
ExprResult CheckConceptTemplateId(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &ConceptNameInfo, NamedDecl *FoundDecl, ConceptDecl *NamedConcept, const TemplateArgumentListInfo *TemplateArgs)
TemplateParameterList * ActOnTemplateParameterList(unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< NamedDecl * > Params, SourceLocation RAngleLoc, Expr *RequiresClause)
ActOnTemplateParameterList - Builds a TemplateParameterList, optionally constrained by RequiresClause...
A class which encapsulates the logic for delaying diagnostics during parsing and other processing.
@ NotACXX20Module
Not a C++20 TU, or an invalid state was found.
ExprResult CheckConditionVariable(VarDecl *ConditionVar, SourceLocation StmtLoc, ConditionKind CK)
Check the use of the given variable as a C++ condition in an if, while, do-while, or switch statement...
~EnterExpressionEvaluationContext()
bool isCurrentClassNameTypo(IdentifierInfo *&II, const CXXScopeSpec *SS)
Determine whether the identifier II is a typo for the name of the class type currently being defined.
StmtResult ActOnOpenMPRegionEnd(StmtResult S, ArrayRef< OMPClause * > Clauses)
End of OpenMP region.
QualType BuildReadPipeType(QualType T, SourceLocation Loc)
Build a Read-only Pipe type.
bool ActOnStartOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI)
Called on the start of target region i.e. '#pragma omp declare target'.
IntelFPGAMaxReplicatesAttr * MergeIntelFPGAMaxReplicatesAttr(Decl *D, const IntelFPGAMaxReplicatesAttr &A)
unsigned getDiagnosticIndex() const
Get the index of this function kind for use in diagnostics.
OMPClause * ActOnOpenMPSimpleClause(OpenMPClauseKind Kind, unsigned Argument, SourceLocation ArgumentLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
@ LookupNamespaceName
Look up a namespace name within a C++ using directive or namespace alias definition,...
OMPClause * ActOnOpenMPWriteClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'write' clause.
bool CheckFunctionReturnType(QualType T, SourceLocation Loc)
static CastKind ScalarTypeToBooleanCastKind(QualType ScalarTy)
ScalarTypeToBooleanCastKind - Returns the cast kind corresponding to the conversion from scalar type ...
StmtResult ActOnCapturedRegionEnd(Stmt *S)
FileNullability Nullability
void LookupOverloadedBinOp(OverloadCandidateSet &CandidateSet, OverloadedOperatorKind Op, const UnresolvedSetImpl &Fns, ArrayRef< Expr * > Args, bool RequiresADL=true)
Perform lookup for an overloaded binary operator.
void NoteAllFoundTemplates(TemplateName Name)
void runWithSufficientStackSpace(SourceLocation Loc, llvm::function_ref< void()> Fn)
Run some code with "sufficient" stack space.
static AlignPackInfo getFromRawEncoding(unsigned Encoding)
bool RebuildNestedNameSpecifierInCurrentInstantiation(CXXScopeSpec &SS)
void enterBinary(Sema &S, SourceLocation Tok, Expr *LHS, tok::TokenKind Op)
YAML serialization mapping.
bool InstantiateClass(SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK, bool Complain=true)
Instantiate the definition of a class from a given pattern.
FunctionTemplateDecl * getMoreSpecializedTemplate(FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, unsigned NumCallArguments2, bool Reversed=false)
Returns the more specialized function template according to the rules of function template partial or...
ExprResult CheckPlaceholderExpr(Expr *E)
Check for operands with placeholder types and complain if found.
Represents a C++ constructor within a class.
void MarkAsLateParsedTemplate(FunctionDecl *FD, Decl *FnD, CachedTokens &Toks)
ExprResult CheckLValueToRValueConversionOperand(Expr *E)
QualType GetSignedVectorType(QualType V)
void ActOnParamDefaultArgumentError(Decl *param, SourceLocation EqualLoc)
ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the paramet...
OMPClause * ActOnOpenMPCaptureClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'capture' clause.
void CheckObjCPropertyAttributes(Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass)
Ensure attributes are consistent with type.
ObjCIvarDecl * GetIvarBackingPropertyAccessor(const ObjCMethodDecl *Method, const ObjCPropertyDecl *&PDecl) const
GetIvarBackingPropertyAccessor - If method is a property setter/getter and it property has a backing ...
StmtResult BuildAttributedStmt(SourceLocation AttrsLoc, ArrayRef< const Attr * > Attrs, Stmt *SubStmt)
TemplateParameterList * MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef< TemplateParameterList * > ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic=false)
Match the given template parameter lists to the given scope specifier, returning the template paramet...
void DiagnoseUnusedNestedTypedefs(const RecordDecl *D)
UnparsedDefaultArgInstantiationsMap UnparsedDefaultArgInstantiations
A mapping from parameters with unparsed default arguments to the set of instantiations of each parame...
ExprResult ActOnNoexceptExpr(SourceLocation KeyLoc, SourceLocation LParen, Expr *Operand, SourceLocation RParen)
DeclarationNameInfo SubstDeclarationNameInfo(const DeclarationNameInfo &NameInfo, const MultiLevelTemplateArgumentList &TemplateArgs)
Do template substitution on declaration name info.
void DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool SynthesizeProperties)
DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by...
ExpressionKind
Describes whether we are in an expression constext which we have to handle differently.
@ TDK_Invalid
The declaration was invalid; do nothing.
@ PCC_Namespace
Code completion occurs at top-level or namespace context.
@ IncompatiblePointer
IncompatiblePointer - The assignment is between two pointers types that are not compatible,...
llvm::SmallPtrSet< const CXXRecordDecl *, 8 > RecordDeclSetTy
void ActOnStartDelayedCXXMethodDeclaration(Scope *S, Decl *Method)
ActOnStartDelayedCXXMethodDeclaration - We have completed parsing a top-level (non-nested) C++ class,...
bool CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl)
CheckOverloadedOperatorDeclaration - Check whether the declaration of this overloaded operator is wel...
static bool GetFormatNSStringIdx(const FormatAttr *Format, unsigned &Idx)
ReferenceCompareResult CompareReferenceRelationship(SourceLocation Loc, QualType T1, QualType T2, ReferenceConversions *Conv=nullptr)
CompareReferenceRelationship - Compare the two types T1 and T2 to determine whether they are referenc...
@ NC_NonType
The name was classified as a specific non-type, non-template declaration.
ExprResult ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
void CleanupVarDeclMarking()
bool isExternalWithNoLinkageType(ValueDecl *VD)
Determine if VD, which must be a variable or function, is an external symbol that nonetheless can't b...
ObjCMethodDecl * ArrayWithObjectsMethod
The declaration of the arrayWithObjects:count: method.
SmallVector< CXXMethodDecl *, 4 > DelayedDllExportMemberFunctions
@ Boolean
A boolean condition, from 'if', 'while', 'for', or 'do'.
ExpressionEvaluationContextRecord(ExpressionEvaluationContext Context, unsigned NumCleanupObjects, CleanupInfo ParentCleanup, Decl *ManglingContextDecl, ExpressionKind ExprContext)
@ ForVisibleRedeclaration
The lookup results will be used for redeclaration of a name, if an entity by that name already exists...
void ConstructOpenCLKernel(FunctionDecl *KernelCallerFunc, MangleContext &MC)
SYCLIntelMaxGlobalWorkDimAttr * MergeSYCLIntelMaxGlobalWorkDimAttr(Decl *D, const SYCLIntelMaxGlobalWorkDimAttr &A)
A little helper class used to produce diagnostics.
void deduceClosureReturnType(sema::CapturingScopeInfo &CSI)
Deduce a block or lambda's return type based on the return statements present in the body.
void LoadExternalVTableUses()
Load any externally-stored vtable uses.
const TranslationUnitKind TUKind
The kind of translation unit we are processing.
int count(Selector Sel) const
QualType PreferredConditionType(ConditionKind K) const
void deduceOpenCLAddressSpace(ValueDecl *decl)
SourceLocation LParenLoc
Locations of '(' and ')' symbols.
Information about a template-id annotation token.
void CalledExpr(Expr *E)
Integrate an invoked expression into the collected data.
AvailabilityMergeKind
Describes the kind of merge to perform for availability attributes (including "deprecated",...
NamedDecl * ActOnTypedefNameDecl(Scope *S, DeclContext *DC, TypedefNameDecl *D, LookupResult &Previous, bool &Redeclaration)
ActOnTypedefNameDecl - Perform semantic checking for a declaration which declares a typedef-name,...
QualType CheckVectorCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
CheckVectorCompareOperands - vector comparisons are a clang extension that operates on extended vecto...
bool DeferDiags
Whether deferrable diagnostics should be deferred.
llvm::DenseMap< NamedDecl *, NamedDecl * > VisibleNamespaceCache
Map from the most recent declaration of a namespace to the most recent visible declaration of that na...
LiteralOperatorLookupResult LookupLiteralOperator(Scope *S, LookupResult &R, ArrayRef< QualType > ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplate, bool DiagnoseMissing, StringLiteral *StringLit=nullptr)
LookupLiteralOperator - Determine which literal operator should be used for a user-defined literal,...
NestedNameSpecInfo(IdentifierInfo *II, SourceLocation IdLoc, SourceLocation ColonColonLoc, QualType ObjectType)
DLLImportAttr * mergeDLLImportAttr(Decl *D, const AttributeCommonInfo &CI)
Represents a complete lambda introducer.
Expr * NoexceptExpr
Noexcept expression, if this is a computed noexcept specification.
bool CheckRedeclarationExported(NamedDecl *New, NamedDecl *Old)
void AddSYCLAddIRAttributesFunctionAttr(Decl *D, const AttributeCommonInfo &CI, MutableArrayRef< Expr * > Args)
void MarkVirtualMemberExceptionSpecsNeeded(SourceLocation Loc, const CXXRecordDecl *RD)
Mark the exception specifications of all virtual member functions in the given class as needed.
ObjCInterfaceDecl * NSValueDecl
The declaration of the Objective-C NSValue class.
OMPClause * ActOnOpenMPFilterClause(Expr *ThreadID, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'filter' clause.
void CodeCompleteDeclSpec(Scope *S, DeclSpec &DS, bool AllowNonIdentifiers, bool AllowNestedNameSpecifiers)
FunctionDecl * SubstSpaceshipAsEqualEqual(CXXRecordDecl *RD, FunctionDecl *Spaceship)
Substitute the name and return type of a defaulted 'operator<=>' to form an implicit 'operator=='.
bool TemplateParameterListsAreEqual(TemplateParameterList *New, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation())
Determine whether the given template parameter lists are equivalent.
SYCLIntelNoGlobalWorkOffsetAttr * MergeSYCLIntelNoGlobalWorkOffsetAttr(Decl *D, const SYCLIntelNoGlobalWorkOffsetAttr &A)
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, std::vector< DeviceDeferredDiagnostic > > DeviceDeferredDiags
Diagnostics that are emitted only if we discover that the given function must be codegen'ed.
bool CanPerformAggregateInitializationForOverloadResolution(const InitializedEntity &Entity, InitListExpr *From)
Determine whether we can perform aggregate initialization for the purposes of overload resolution.
DeclRefExpr * BuildDeclRefExpr(ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr)
ObjCPropertyDecl * HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind)
Called by ActOnProperty to handle @property declarations in class extensions.
@ ObjCSuperMessage
The message is sent to 'super'.
Optional< std::pair< FunctionDecl *, Expr * > > checkOpenMPDeclareVariantFunction(DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR)
Checks '#pragma omp declare variant' variant function and original functions after parsing of the ass...
void ActOnPragmaUnused(const Token &Identifier, Scope *curScope, SourceLocation PragmaLoc)
ActOnPragmaUnused - Called on well-formed '#pragma unused'.
bool IsBlockPointerConversion(QualType FromType, QualType ToType, QualType &ConvertedType)
void pushCodeSynthesisContext(CodeSynthesisContext Ctx)
@ LookupLocalFriendName
Look up a friend of a local class.
@ IncompatibleBlockPointer
IncompatibleBlockPointer - The assignment is between two block pointers types that are not compatible...
A set of unresolved declarations.
bool CheckInstantiatedFunctionTemplateConstraints(SourceLocation PointOfInstantiation, FunctionDecl *Decl, ArrayRef< TemplateArgument > TemplateArgs, ConstraintSatisfaction &Satisfaction)
RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers...
bool SubstParmTypes(SourceLocation Loc, ArrayRef< ParmVarDecl * > Params, const FunctionProtoType::ExtParameterInfo *ExtParamInfos, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< QualType > &ParamTypes, SmallVectorImpl< ParmVarDecl * > *OutParams, ExtParameterInfoBuilder &ParamInfos)
Substitute the given template arguments into the given set of parameters, producing the set of parame...
void CheckStaticArrayArgument(SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr)
CheckStaticArrayArgument - If the given argument corresponds to a static array parameter,...
FunctionScopeRAII(Sema &S)
SYCLIntelSchedulerTargetFmaxMhzAttr * MergeSYCLIntelSchedulerTargetFmaxMhzAttr(Decl *D, const SYCLIntelSchedulerTargetFmaxMhzAttr &A)
TemplateArgumentLoc SubstDefaultTemplateArgumentIfAvailable(TemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, Decl *Param, SmallVectorImpl< TemplateArgument > &Converted, bool &HasDefaultArg)
If the given template parameter has a default template argument, substitute into that default templat...
static bool isEqual(const FunctionDeclAndLoc &LHS, const FunctionDeclAndLoc &RHS)
std::function< void(const TypoCorrection &)> TypoDiagnosticGenerator
StmtResult BuildCoroutineBodyStmt(CoroutineBodyStmt::CtorArgs)
@ KernelCallUndefinedFunction
StmtResult ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, ArrayRef< Stmt * > Handlers)
ActOnCXXTryBlock - Takes a try compound-statement and a number of handlers and creates a try statemen...
bool isMemberAccessibleForDeletion(CXXRecordDecl *NamingClass, DeclAccessPair Found, QualType ObjectType)
Abstract class used to diagnose incomplete types.
ExprResult ActOnParenListExpr(SourceLocation L, SourceLocation R, MultiExprArg Val)
OMPClause * ActOnOpenMPExclusiveClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'exclusive' clause.
bool CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK)
CheckMessageArgumentTypes - Check types in an Obj-C message send.
@ FunctionVoidPointer
FunctionVoidPointer - The assignment is between a function pointer and void*, which the standard does...
void inferGslOwnerPointerAttribute(CXXRecordDecl *Record)
Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types.
ObjCInterfaceDecl * NSStringDecl
The declaration of the Objective-C NSString class.
A trivial tuple used to represent a source range.
Decl * ActOnUsingDirective(Scope *CurScope, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, const ParsedAttributesView &AttrList)
Expr * stripARCUnbridgedCast(Expr *e)
stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast.
unsigned InventedParameterInfosStart
The index of the first InventedParameterInfo that refers to the current context.
void CodeCompleteCase(Scope *S)
Decl * ActOnStartCategoryImplementation(SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc, const ParsedAttributesView &AttrList)
ActOnStartCategoryImplementation - Perform semantic checks on the category implementation declaration...
ExprResult ActOnGNUNullExpr(SourceLocation TokenLoc)
void ActOnEndOfTranslationUnit()
ActOnEndOfTranslationUnit - This is called at the very end of the translation unit when EOF is reache...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
void ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope(Decl *D, SmallVectorImpl< FunctionDecl * > &Bases)
Register D as specialization of all base functions in Bases in the current omp begin/end declare vari...
bool RequireNonAbstractType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
std::string getFixItZeroLiteralForType(QualType T, SourceLocation Loc) const
DeclGroupPtrTy ActOnOpenMPRequiresDirective(SourceLocation Loc, ArrayRef< OMPClause * > ClauseList)
Called on well-formed '#pragma omp requires'.
ExprResult CheckExtVectorCast(SourceRange R, QualType DestTy, Expr *CastExpr, CastKind &Kind)
MinSizeAttr * mergeMinSizeAttr(Decl *D, const AttributeCommonInfo &CI)
concepts::Requirement * ActOnSimpleRequirement(Expr *E)
OMPClause * ActOnOpenMPFullClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-form 'full' clauses.
ExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind)
ActOnCXXBoolLiteral - Parse {true,false} literals.
unsigned TyposCorrected
The number of typos corrected by CorrectTypo.
Represents a C++ conversion function within a class.
Decl * ActOnEnumConstant(Scope *S, Decl *EnumDecl, Decl *LastEnumConstant, SourceLocation IdLoc, IdentifierInfo *Id, const ParsedAttributesView &Attrs, SourceLocation EqualLoc, Expr *Val)
@ UPPC_IfNotExists
Microsoft __if_not_exists.
Decl * ActOnStartLinkageSpecification(Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc)
ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification,...
bool hasGlobalStorage() const
Returns true for all variables that do not have local storage.
void ActOnLambdaExplicitTemplateParameterList(SourceLocation LAngleLoc, ArrayRef< NamedDecl * > TParams, SourceLocation RAngleLoc, ExprResult RequiresClause)
This is called after parsing the explicit template parameter list on a lambda (if it exists) in C++2a...
Simple class containing the result of Sema::CorrectTypo.
IntelFPGANumBanksAttr * MergeIntelFPGANumBanksAttr(Decl *D, const IntelFPGANumBanksAttr &A)
virtual SemaDiagnosticBuilder diagnoseConversion(Sema &S, SourceLocation Loc, QualType T, QualType ConvTy)=0
Emits a diagnostic when we picked a conversion function (for cases when we are not allowed to pick a ...
@ AMK_Override
Merge availability attributes for an override, which requires an exact match or a weakening of constr...
StmtResult ActOnOpenMPTargetDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target' after parsing of the associated statement.
void ActOnPragmaMSInitSeg(SourceLocation PragmaLocation, StringLiteral *SegmentName)
Called on well-formed #pragma init_seg().
bool DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType)
@ UPPC_DeclarationType
The type of an arbitrary declaration.
void ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc, Expr *defarg)
ActOnParamDefaultArgument - Check whether the default argument provided for a function parameter is w...
TemplateArgumentLoc getIdentityTemplateArgumentLoc(NamedDecl *Param, SourceLocation Location)
Get a template argument mapping the given template parameter to itself, e.g.
void DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc, ArrayRef< Expr * > Args)
DiagnoseSentinelCalls - This routine checks whether a call or message-send is to a declaration with t...
bool isOpenMPTargetCapturedDecl(const ValueDecl *D, unsigned Level, unsigned CaptureLevel) const
Check if the specified variable is captured by 'target' directive.
ExprResult BuildSYCLBuiltinFieldTypeExpr(SourceLocation Loc, QualType SourceTy, Expr *Idx)
CXXConstructorDecl * DeclareImplicitMoveConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit move constructor for the given class.
void MarkMemberReferenced(MemberExpr *E)
Perform reference-marking and odr-use handling for a MemberExpr.
void CheckFloatComparison(SourceLocation Loc, Expr *LHS, Expr *RHS, BinaryOperatorKind Opcode)
Check for comparisons of floating-point values using == and !=.
StringLiteral * CurInitSeg
Last section used with #pragma init_seg.
ObjCMethodDecl * LookupInstanceMethodInGlobalPool(Selector Sel, SourceRange R, bool receiverIdOrClass=false)
LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
ASTContext & getASTContext() const
OverloadCandidateParamOrder
The parameter ordering that will be used for the candidate.
CXXMethodDecl * LookupCopyingAssignment(CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
Look up the copying assignment operator for the given class.
VarDecl * isOpenMPCapturedDecl(ValueDecl *D, bool CheckScopeInfo=false, unsigned StopAt=0)
Check if the specified variable is used in one of the private clauses (private, firstprivate,...
void ActOnFinishCXXNonNestedClass()
@ BFRK_Build
Initial building of a for-range statement.
void FreeVisContext()
FreeVisContext - Deallocate and null out VisContext.
OMPClause * ActOnOpenMPSafelenClause(Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'safelen' clause.
sema::FunctionScopeInfo * getCurFunction() const
void InstantiateVariableDefinition(SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false, bool AtEndOfTU=false)
Instantiate the definition of the given variable from its template.
QualType CheckAddressOfOperand(ExprResult &Operand, SourceLocation OpLoc)
CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designatin...
OMPClause * ActOnOpenMPDetachClause(Expr *Evt, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'detach' clause.
OMPClause * ActOnOpenMPNovariantsClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'novariants' clause.
TemplateArgumentLoc getTrivialTemplateArgumentLoc(const TemplateArgument &Arg, QualType NTTPType, SourceLocation Loc)
Allocate a TemplateArgumentLoc where all locations have been initialized to the given location.
SourceManager & SourceMgr
TemplateNameKind
Specifies the kind of template name that an identifier refers to.
void AddKnownFunctionAttributes(FunctionDecl *FD)
Adds any function attributes that we know a priori based on the declaration of this function.
Decl * ActOnStartClassInterface(Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList)
void handleDelayedAvailabilityCheck(sema::DelayedDiagnostic &DD, Decl *Ctx)
SYCLIntelFPGAInitiationIntervalAttr * BuildSYCLIntelFPGAInitiationIntervalAttr(const AttributeCommonInfo &CI, Expr *E)
@ NTCUC_LValueToRValueVolatile
threadSafety::BeforeSet * ThreadSafetyDeclCache
PragmaStack< StringLiteral * > DataSegStack
ExprResult ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
ActOnCXXTypeid - Parse typeid( something ).
void CodeCompleteObjCProtocolReferences(ArrayRef< IdentifierLocPair > Protocols)
void CheckVariableDeclarationType(VarDecl *NewVD)
StmtResult BuildCoreturnStmt(SourceLocation KwLoc, Expr *E, bool IsImplicit=false)
void AddInstanceMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false)
AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool...
bool isMicrosoftMissingTypename(const CXXScopeSpec *SS, Scope *S)
isMicrosoftMissingTypename - In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal...
ICEConvertDiagnoser(bool AllowScopedEnumerations, bool Suppress, bool SuppressConversion)
void checkNonTrivialCUnionInInitializer(const Expr *Init, SourceLocation Loc)
Emit diagnostics if the initializer or any of its explicit or implicitly-generated subexpressions req...
void checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, SourceLocation IdLoc=SourceLocation())
Check declaration inside target region.
virtual void ReadDelegatingConstructors(SmallVectorImpl< CXXConstructorDecl * > &Decls)
Read the set of delegating constructors known to the external Sema source.
RecordDecl * CXXTypeInfoDecl
The C++ "type_info" declaration, which is defined in <typeinfo>.
ExprResult ActOnDecltypeExpression(Expr *E)
Process the expression contained within a decltype.
static NameClassification OverloadSet(ExprResult E)
int ArgumentPackSubstitutionIndex
The current index into pack expansion arguments that will be used for substitution of parameter packs...
void ActOnPragmaMSSeg(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName)
Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg.
NameClassification(const IdentifierInfo *Keyword)
SYCLIntelFPGAMaxInterleavingAttr * BuildSYCLIntelFPGAMaxInterleavingAttr(const AttributeCommonInfo &CI, Expr *E)
Represents C++ using-directive.
ExprResult BuildDependentDeclRefExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
void checkCUDATargetOverload(FunctionDecl *NewFD, const LookupResult &Previous)
Check whether NewFD is a valid overload for CUDA.
@ UnevaluatedAbstract
The current expression occurs within an unevaluated operand that unconditionally permits abstract ref...
ExprResult ActOnIdExpression(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, CorrectionCandidateCallback *CCC=nullptr, bool IsInlineAsmIdentifier=false, Token *KeywordReplacement=nullptr)
void ActOnCXXExitDeclInitializer(Scope *S, Decl *Dcl)
ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the declaratio...
static DeclarationName getPrintable(DeclarationName N)
bool RequireCompleteDeclContext(CXXScopeSpec &SS, DeclContext *DC)
Require that the context specified by SS be complete.
ObjCMethodDecl * LookupFactoryMethodInGlobalPool(Selector Sel, SourceRange R, bool receiverIdOrClass=false)
LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
void MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old)
Merge the exception specifications of two variable declarations.
@ KernelCallVirtualFunction
bool ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef< Expr * > Args, SourceLocation RParenLoc, bool ExecConfig=false)
ConvertArgumentsForCall - Converts the arguments specified in Args/NumArgs to the parameter types of ...
void NoteDeletedFunction(FunctionDecl *FD)
Emit a note explaining that this function is deleted.
SemaDiagnosticBuilder SYCLDiagIfDeviceCode(SourceLocation Loc, unsigned DiagID, DeviceDiagnosticReason Reason=DeviceDiagnosticReason::Sycl|DeviceDiagnosticReason::Esimd)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
A binding in a decomposition declaration.
ExprResult CallExprUnaryConversions(Expr *E)
CallExprUnaryConversions - a special case of an unary conversion performed on a function designator o...
bool AreMultipleMethodsInGlobalPool(Selector Sel, ObjCMethodDecl *BestMethod, SourceRange R, bool receiverIdOrClass, SmallVectorImpl< ObjCMethodDecl * > &Methods)
void AddNonMemberOperatorCandidates(const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
Add all of the non-member operator function declarations in the given function set to the overload ca...
RedeclarationKind forRedeclarationInCurContext()
void ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value)
ActOnPragmaFloatControl - Call on well-formed #pragma float_control.
DeclResult actOnObjCTypeParam(Scope *S, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, IdentifierInfo *paramName, SourceLocation paramLoc, SourceLocation colonLoc, ParsedType typeBound)
StmtResult ActOnOpenMPTargetParallelGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel loop' after parsing of the associated statement.
ExprResult ActOnRequiresExpr(SourceLocation RequiresKWLoc, RequiresExprBodyDecl *Body, ArrayRef< ParmVarDecl * > LocalParameters, ArrayRef< concepts::Requirement * > Requirements, SourceLocation ClosingBraceLoc)
@ LOLR_StringTemplatePack
The lookup found an overload set of literal operator templates, which expect the character type and c...
bool CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old)
CheckOverridingFunctionExceptionSpec - Checks whether the exception spec is a subset of base spec.
SmallVector< InventedTemplateParameterInfo, 4 > InventedParameterInfos
Stack containing information needed when in C++2a an 'auto' is encountered in a function declaration ...
Expr * Allocator
Allocator.
StmtResult ActOnBreakStmt(SourceLocation BreakLoc, Scope *CurScope)
void PushForceCUDAHostDevice()
Increments our count of the number of times we've seen a pragma forcing functions to be host device.
std::string getFixItZeroInitializerForType(QualType T, SourceLocation Loc) const
Get a string to suggest for zero-initialization of a type.
AlwaysInlineAttr * mergeAlwaysInlineAttr(Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Ident)
bool isObjCWritebackConversion(QualType FromType, QualType ToType, QualType &ConvertedType)
Determine whether this is an Objective-C writeback conversion, used for parameter passing when perfor...
Encodes a location in the source.
@ Interface
'export module X;'
QualType ActOnOpenMPDeclareReductionType(SourceLocation TyLoc, TypeResult ParsedType)
Check if the specified type is allowed to be used in 'omp declare reduction' construct.
@ ParameterMappingSubstitution
SmallVector< sema::FunctionScopeInfo *, 4 > FunctionScopes
Stack containing information about each of the nested function, block, and method scopes that are cur...
ExprResult BuildObjCDictionaryLiteral(SourceRange SR, MutableArrayRef< ObjCDictionaryElement > Elements)
QualType InvalidLogicalVectorOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
SourceLocation PointOfInstantiation
The point of instantiation or synthesis within the source code.
void ActOnCXXForRangeDecl(Decl *D)
ExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc, tok::TokenKind Kind, Expr *LHSExpr, Expr *RHSExpr)
AccessResult CheckFriendAccess(NamedDecl *D)
Checks access to the target of a friend declaration.
void ActOnPragmaDetectMismatch(SourceLocation Loc, StringRef Name, StringRef Value)
ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.
SemaDiagnosticBuilder targetDiag(SourceLocation Loc, const PartialDiagnostic &PD, FunctionDecl *FD=nullptr)
This represents '#pragma omp threadprivate ...' directive.
ExprResult ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor)
PragmaStack< StringLiteral * > CodeSegStack
void ActOnObjCContainerFinishDefinition()
SizelessTypeDiagnoser(unsigned DiagID, const Ts &... Args)
@ TNK_Undeclared_template
Lookup for the name failed, but we're assuming it was a template name anyway.
StmtResult ActOnFinishFullStmt(Stmt *Stmt)
SectionAttr * mergeSectionAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Name)
void AddPushedVisibilityAttribute(Decl *RD)
AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility at...
sema::AnalysisBasedWarnings AnalysisWarnings
Worker object for performing CFG-based warnings.
void AtomicPropertySetterGetterRules(ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl)
AtomicPropertySetterGetterRules - This routine enforces the rule (via warning) when atomic property h...
void CheckLookupAccess(const LookupResult &R)
Checks access to all the declarations in the given result set.
StmtResult ActOnOpenMPParallelDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel' after parsing of the associated statement.
void CompleteMemberSpecialization(NamedDecl *Member, LookupResult &Previous)
void CheckMSVCRTEntryPoint(FunctionDecl *FD)
void LookupOverloadedOperatorName(OverloadedOperatorKind Op, Scope *S, UnresolvedSetImpl &Functions)
void AddAllocAlignAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ParamExpr)
AddAllocAlignAttr - Adds an alloc_align attribute to a particular declaration.
void DiagnoseClassExtensionDupMethods(ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID)
DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension...
This represents a decl that may have a name.
bool UseArgumentDependentLookup(const CXXScopeSpec &SS, const LookupResult &R, bool HasTrailingLParen)
sema::FunctionScopeInfo * getEnclosingFunction() const
void DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init)
Sema::AllowedExplicit AllowedExplicit
ExprResult TemporaryMaterializationConversion(Expr *E)
If E is a prvalue denoting an unmaterialized temporary, materialize it as an xvalue.
@ Ref_Related
Ref_Related - The two types are reference-related, which means that their unqualified forms (T1 and T...
bool AttachTypeConstraint(NestedNameSpecifierLoc NS, DeclarationNameInfo NameInfo, ConceptDecl *NamedConcept, const TemplateArgumentListInfo *TemplateArgs, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
Attach a type-constraint to a template parameter.
bool RequireLiteralType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
CastKind PrepareScalarCast(ExprResult &src, QualType destType)
Prepares for a scalar cast, performing all the necessary stages except the final cast and returning t...
static unsigned getHashValue(const FunctionDeclAndLoc &FDL)
ExprResult VerifyIntegerConstantExpression(Expr *E, AllowFoldKind CanFold=NoFold)
void DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc)
Warn if a value is moved to itself.
SpecialMemberOverloadResult(CXXMethodDecl *MD)
Decl * ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, Decl *const *ProtoRefNames, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList)
ExprResult ActOnNameClassifiedAsDependentNonType(const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, bool IsAddressOfOperand)
Act on the result of classifying a name as an undeclared member of a dependent base class.
QualType CheckMultiplyDivideOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool IsDivide)
@ TNK_Function_template
The name refers to a function template or a set of overloaded functions that includes at least one fu...
void DiagnoseUnterminatedPragmaAttribute()
bool findMacroSpelling(SourceLocation &loc, StringRef name)
Looks through the macro-expansion chain for the given location, looking for a macro expansion with th...
FunctionDecl * FindUsualDeallocationFunction(SourceLocation StartLoc, bool CanProvideSize, bool Overaligned, DeclarationName Name)
CXXConstructorDecl * findInheritingConstructor(SourceLocation Loc, CXXConstructorDecl *BaseCtor, ConstructorUsingShadowDecl *DerivedShadow)
Given a derived-class using shadow declaration for a constructor and the correspnding base class cons...
SkipBodyInfo shouldSkipAnonEnumBody(Scope *S, IdentifierInfo *II, SourceLocation IILoc)
Determine whether the body of an anonymous enumeration should be skipped.
NamedDecl * FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext=false)
Find the instantiation of the given declaration within the current instantiation.
SmallVector< Slot, 2 > Stack
AlignPackInfo(AlignPackInfo::Mode M, unsigned Num, bool IsXL)
bool isMoreSpecializedThanPrimary(ClassTemplatePartialSpecializationDecl *T, sema::TemplateDeductionInfo &Info)
bool IsStringLiteralToNonConstPointerConversion(Expr *From, QualType ToType)
Helper function to determine whether this is the (deprecated) C++ conversion from a string literal to...
bool IsFloatingPointPromotion(QualType FromType, QualType ToType)
IsFloatingPointPromotion - Determines whether the conversion from FromType to ToType is a floating po...
void DefineInheritingConstructor(SourceLocation UseLoc, CXXConstructorDecl *Constructor)
Define the specified inheriting constructor.
CanonicalDeclPtr< FunctionDecl > FD
bool isUnevaluated() const
StmtResult ActOnFinishSEHFinallyBlock(SourceLocation Loc, Stmt *Block)
void ActOnMemInitializers(Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef< CXXCtorInitializer * > MemInits, bool AnyErrors)
ActOnMemInitializers - Handle the member initializers for a constructor.
PragmaStack< FPOptionsOverride > FpPragmaStack
QualType FindCompositeObjCPointerType(ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types ...
ExprResult ActOnSYCLUniqueStableIdExpr(SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, Expr *E)
FunctionDecl * ResolveSingleFunctionTemplateSpecialization(OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr)
Given an expression that refers to an overloaded function, try to resolve that overloaded function ex...
@ PCC_MemberTemplate
Code completion occurs following one or more template headers within a class.
llvm::DenseSet< QualType > InstantiatedNonDependentTypes
Non-dependent types used in templates that have already been instantiated by some template instantiat...
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
bool GatherArgumentsForCall(SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef< Expr * > Args, SmallVectorImpl< Expr * > &AllArgs, VariadicCallType CallType=VariadicDoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false)
GatherArgumentsForCall - Collector argument expressions for various form of call prototypes.
OMPClause * ActOnOpenMPNogroupClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'nogroup' clause.
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
virtual SemaDiagnosticBuilder diagnoseNotInt(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic complaining that the expression does not have integral or enumeration type.
void SetDeclDefaulted(Decl *dcl, SourceLocation DefaultLoc)
void AddIntelFPGABankBitsAttr(Decl *D, const AttributeCommonInfo &CI, Expr **Exprs, unsigned Size)
Helper data structure representing the traits in a match clause of an declare variant or metadirectiv...
A (possibly-)qualified type.
void DiagnoseAbstractType(const CXXRecordDecl *RD)
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
IntelFPGAForcePow2DepthAttr * MergeIntelFPGAForcePow2DepthAttr(Decl *D, const IntelFPGAForcePow2DepthAttr &A)
void MatchAllMethodDeclarations(const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl=false)
MatchAllMethodDeclarations - Check methods declaraed in interface or or protocol against those declar...
LateTemplateParserCleanupCB * LateTemplateParserCleanup
concepts::ExprRequirement * BuildExprRequirement(Expr *E, bool IsSatisfied, SourceLocation NoexceptLoc, concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement)
ArraySizeModifier
Capture whether this is a normal array (e.g.
void checkUnusedDeclAttributes(Declarator &D)
@ LookupAnyName
Look up any declaration with any name.
VisibilityAttr * mergeVisibilityAttr(Decl *D, const AttributeCommonInfo &CI, VisibilityAttr::VisibilityType Vis)
ExprResult ActOnAsTypeExpr(Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
__builtin_astype(...)
virtual SemaDiagnosticBuilder noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy)=0
Emits a note for one of the candidate conversions.
@ EST_None
no exception specification
@ LOLR_ErrorNoDiagnostic
The lookup found no match but no diagnostic was issued.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
void ActOnReenterFunctionContext(Scope *S, Decl *D)
Push the parameters of D, which must be a function, into scope.
bool AddOverriddenMethods(CXXRecordDecl *DC, CXXMethodDecl *MD)
AddOverriddenMethods - See if a method overrides any in the base classes, and if so,...
ClassTemplatePartialSpecializationDecl * getMoreSpecializedPartialSpecialization(ClassTemplatePartialSpecializationDecl *PS1, ClassTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
Returns the more specialized class template partial specialization according to the rules of partial ...
ObjCMethodDecl * LookupImplementedMethodInGlobalPool(Selector Sel)
LookupImplementedMethodInGlobalPool - Returns the method which has an implementation.
SYCLIntelFPGAMaxConcurrencyAttr * MergeSYCLIntelFPGAMaxConcurrencyAttr(Decl *D, const SYCLIntelFPGAMaxConcurrencyAttr &A)
StmtResult ActOnOpenMPTargetSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target simd' after parsing of the associated statement.
void ActOnCXXEnterDeclInitializer(Scope *S, Decl *Dcl)
ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the declaration ...
ExprResult BuildStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc, unsigned TemplateDepth)
bool hasVisibleDeclarationSlow(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules)
void CheckAlignasUnderalignment(Decl *D)
const NormalizedConstraint * getNormalizedAssociatedConstraints(NamedDecl *ConstrainedDecl, ArrayRef< const Expr * > AssociatedConstraints)
The iterator over UnresolvedSets.
DLLExportAttr * mergeDLLExportAttr(Decl *D, const AttributeCommonInfo &CI)
void ActOnOpenMPDeclareVariantDirective(FunctionDecl *FD, Expr *VariantRef, OMPTraitInfo &TI, ArrayRef< Expr * > AdjustArgsNothing, ArrayRef< Expr * > AdjustArgsNeedDevicePtr, ArrayRef< OMPDeclareVariantAttr::InteropType > AppendArgs, SourceLocation AdjustArgsLoc, SourceLocation AppendArgsLoc, SourceRange SR)
Called on well-formed '#pragma omp declare variant' after parsing of the associated method/function.
ExprResult ActOnBuiltinBitCastExpr(SourceLocation KWLoc, Declarator &Dcl, ExprResult Operand, SourceLocation RParenLoc)
Represents a member of a struct/union/class.
LazyDeclPtr StdBadAlloc
The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
bool CheckDependentFunctionTemplateSpecialization(FunctionDecl *FD, const TemplateArgumentListInfo &ExplicitTemplateArgs, LookupResult &Previous)
Perform semantic analysis for the given dependent function template specialization.
ARCConversionResult CheckObjCConversion(SourceRange castRange, QualType castType, Expr *&op, CheckedConversionKind CCK, bool Diagnose=true, bool DiagnoseCFAudited=false, BinaryOperatorKind Opc=BO_PtrMemD)
Checks for invalid conversions and casts between retainable pointers and other pointer kinds for ARC ...
ExprResult BuildBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
TypeTrait
Names for traits that operate specifically on types.
@ PCC_ObjCImplementation
Code completion occurs within an Objective-C implementation or category implementation.
ParsedType actOnLambdaInitCaptureInitialization(SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, IdentifierInfo *Id, LambdaCaptureInitKind InitKind, Expr *&Init)
Perform initialization analysis of the init-capture and perform any implicit conversions such as an l...
void SetSYCLKernelNames()
void FilterLookupForScope(LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool AllowInlineNamespace)
Filters out lookup results that don't fall within the given scope as determined by isDeclInScope.
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
Concrete class used by the front-end to report problems and issues.
OMPRequiresDecl * CheckOMPRequiresDecl(SourceLocation Loc, ArrayRef< OMPClause * > Clauses)
Check restrictions on Requires directive.
@ LookupOperatorName
Look up of an operator name (e.g., operator+) for use with operator overloading.
@ EST_Dynamic
throw(T1, T2)
Decl * ActOnNamespaceAliasDef(Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident)
Represents the results of name lookup.
StmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc, Expr *SynchExpr, Stmt *SynchBody)
The collection of all-type qualifiers we support.
ExprResult BuildMemberReferenceExpr(Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
NamedDecl * ActOnTypeParameter(Scope *S, bool Typename, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg, bool HasTypeConstraint)
ActOnTypeParameter - Called when a C++ template type parameter (e.g., "typename T") has been parsed.
bool CheckDestructor(CXXDestructorDecl *Destructor)
CheckDestructor - Checks a fully-formed destructor definition for well-formedness,...
void AddMemberOperatorCandidates(OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, OverloadCandidateParamOrder PO={})
Add overload candidates for overloaded operators that are member functions.
CXXConstructorDecl * DeclareImplicitDefaultConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit default constructor for the given class.
Represents a parameter to a function.
OpenMPReductionClauseModifier
OpenMP modifiers for 'reduction' clause.
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID, bool DeferHint=false)
Emit a diagnostic.
TypeSourceInfo * GetTypeForDeclarator(Declarator &D, Scope *S)
GetTypeForDeclarator - Convert the type for the specified declarator to Type instances.
DeviceDeferredDiagnostic(SourceLocation SL, const PartialDiagnostic &PD, DeviceDiagnosticReason R)
static QualType getPrintable(QualType T)
Scope * TUScope
Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in...
@ KernelCallVariadicFunction
Optional< unsigned > getFullyPackExpandedSize(TemplateArgument Arg)
Given a template argument that contains an unexpanded parameter pack, but which has already been subs...
void CUDACheckLambdaCapture(CXXMethodDecl *D, const sema::Capture &Capture)
MaterializeTemporaryExpr * CreateMaterializeTemporaryExpr(QualType T, Expr *Temporary, bool BoundToLvalueReference)
SourceLocation getOptimizeOffPragmaLocation() const
Get the location for the currently active "\#pragma clang optimize off". If this location is invalid,...
Expr * recreateSyntacticForm(PseudoObjectExpr *E)
Given a pseudo-object expression, recreate what it looks like syntactically without the attendant Opa...
StmtResult BuildMSDependentExistsStmt(SourceLocation KeywordLoc, bool IsIfExists, NestedNameSpecifierLoc QualifierLoc, DeclarationNameInfo NameInfo, Stmt *Nested)
void enterSubscript(Sema &S, SourceLocation Tok, Expr *LHS)
bool hasMergedDefinitionInCurrentModule(NamedDecl *Def)
ExprResult ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, Declarator &D, Expr *Initializer)
ActOnCXXNew - Parsed a C++ 'new' expression.
ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, AllowFoldKind CanFold=NoFold)
VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate ...
ExprResult ActOnMemberAccessExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Member, Decl *ObjCImpDecl)
The main callback when the parser finds something like expression .
@ None
Diagnostic doesn't apply to anything.
ExprResult BuildCallToObjectOfClassType(Scope *S, Expr *Object, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
BuildCallToObjectOfClassType - Build a call to an object of class type (C++ [over....
QualType CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
OMPClause * ActOnOpenMPIfClause(OpenMPDirectiveKind NameModifier, Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'if' clause.
ParsedType getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS=nullptr, bool isClassName=false, bool HasTrailingDot=false, ParsedType ObjectType=nullptr, bool IsCtorOrDtorName=false, bool WantNontrivialTypeSourceInfo=false, bool IsClassTemplateDeductionContext=true, IdentifierInfo **CorrectedII=nullptr)
If the identifier refers to a type name within this scope, return the declaration of that type.
QualType BuildAtomicType(QualType T, SourceLocation Loc)
SmallVector< CodeSynthesisContext, 16 > CodeSynthesisContexts
List of active code synthesis contexts.
@ Ovl_NonFunction
This is not an overload because the lookup results contain a non-function.
SourceLocation PointerLoc
The first pointer declarator (of any pointer kind) in the file that does not have a corresponding nul...
void checkClassLevelCodeSegAttribute(CXXRecordDecl *Class)
@ KernelCallDllimportFunction
@ CVT_Unified
Emitted on both sides with different addresses.
void DiagnoseSizeOfParametersAndReturnValue(ArrayRef< ParmVarDecl * > Parameters, QualType ReturnTy, NamedDecl *D)
Diagnose whether the size of parameters or return value of a function or obj-c method definition is p...
Tracks expected type during expression parsing, for use in code completion.
StmtResult ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, ParsedAttributes &Attrs)
@ Relational
This is an <, <=, >, or >= that should be implemented as a rewrite in terms of a <=> comparison.
StmtResult ActOnAttributedStmt(const ParsedAttributes &AttrList, Stmt *SubStmt)
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
ExprResult BuildEmptyCXXFoldExpr(SourceLocation EllipsisLoc, BinaryOperatorKind Operator)
void DiscardCleanupsInEvaluationContext()
Parser - This implements a parser for the C family of languages.
@ UPPC_IfExists
Microsoft __if_exists.
ContextualImplicitConverter(bool Suppress=false, bool SuppressConversion=false)
const SemaDiagnosticBuilder & operator<<(T &&V) const
StmtResult ActOnOpenMPForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp for' after parsing of the associated statement.
ExprResult VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth, bool *ZeroWidth=nullptr)
VerifyBitField - verifies that a bit field expression is an ICE and has the correct width,...
EnforceTCBLeafAttr * mergeEnforceTCBLeafAttr(Decl *D, const EnforceTCBLeafAttr &AL)
const VarDecl * getCopyElisionCandidate(NamedReturnInfo &Info, QualType ReturnType)
Updates given NamedReturnInfo's move-eligible and copy-elidable statuses, considering the function re...
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
bool isObjCMethodDecl(Decl *D)
TypeResult ActOnOpenMPDeclareMapperVarDecl(Scope *S, Declarator &D)
Check variable declaration in 'omp declare mapper' construct.
StmtResult ActOnOpenMPGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp loop' after parsing of the associated statement.
ExprResult CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
CreateBuiltinBinOp - Creates a new built-in binary operation with operator Opc at location TokLoc.
SourceManager & getSourceManager() const
SmallVector< PendingImplicitInstantiation, 1 > LateParsedInstantiations
Queue of implicit template instantiations that cannot be performed eagerly.
bool CheckVectorCast(SourceRange R, QualType VectorTy, QualType Ty, CastKind &Kind)
@ CCEK_Enumerator
Enumerator value with fixed underlying type.
LocalEagerInstantiationScope(Sema &S)
DefaultedFunctionKind(DefaultedComparisonKind Comp)
static NameClassification UndeclaredTemplate(TemplateName Name)
static NamedDecl * getAsTemplateNameDecl(NamedDecl *D, bool AllowFunctionTemplates=true, bool AllowDependent=true)
Try to interpret the lookup result D as a template-name.
OMPClause * ActOnOpenMPCopyprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'copyprivate' clause.
bool FunctionParamTypesAreEqual(const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=nullptr)
FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their argum...
bool CheckTemplateArgument(NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl< TemplateArgument > &Converted, CheckTemplateArgumentKind CTAK=CTAK_Specified)
Check that the given template argument corresponds to the given template parameter.
QualType CheckTemplateIdType(TemplateName Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs)
@ DiscardedStatement
The current expression occurs within a discarded statement.
void ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace)
Called on well-formed '#pragma clang attribute pop'.
@ BFRK_Rebuild
Instantiation or recovery rebuild of a for-range statement.
@ TDK_NonDependentConversionFailure
Checking non-dependent argument conversions failed.
void ProcessPragmaWeak(Scope *S, Decl *D)
bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
Perform qualified name lookup into a given context.
ExprResult ActOnCastExpr(Scope *S, SourceLocation LParenLoc, Declarator &D, ParsedType &Ty, SourceLocation RParenLoc, Expr *CastExpr)
void CodeCompleteInPreprocessorConditionalExclusion(Scope *S)
CapturedRegionKind
The different kinds of captured statement.
void MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, LookupResult &OldDecls)
MergeTypedefNameDecl - We just parsed a typedef 'New' which has the same name and scope as a previous...
bool tryToFixVariablyModifiedVarType(TypeSourceInfo *&TInfo, QualType &T, SourceLocation Loc, unsigned FailedFoldDiagID)
Attempt to fold a variable-sized type to a constant-sized type, returning true if we were successful.
OMPClause * ActOnOpenMPWhenClause(OMPTraitInfo &TI, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'when' clause.
@ PCC_ObjCInstanceVariableList
Code completion occurs within the list of instance variables in an Objective-C interface,...
PragmaStack(const ValueType &Default)
OpenMPMapClauseKind
OpenMP mapping kind for 'map' clause.
AccessResult CheckAddressOfMemberAccess(Expr *OvlExpr, DeclAccessPair FoundDecl)
OMPClause * ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc)
Called on well-formed 'defaultmap' clause.
OMPClause * ActOnOpenMPDestroyClause(Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'destroy' clause.
void CodeCompleteObjCProtocolDecl(Scope *S)
Describes an C or C++ initializer list.
QualType CheckVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
RequiredTemplateKind(SourceLocation TemplateKWLoc=SourceLocation())
Template name is required if TemplateKWLoc is valid.
void DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd)
DefaultSynthesizeProperties - This routine default synthesizes all properties which must be synthesiz...
ExprResult BuildPredefinedExpr(SourceLocation Loc, PredefinedExpr::IdentKind IK)
bool isExternallyDeclarable() const
Determine whether this declaration can be redeclared in a different translation unit.
std::unique_ptr< sema::FunctionScopeInfo > CachedFunctionScope
@ TPC_FriendFunctionTemplate
void AddTemplateOverloadCandidate(FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=true, ADLCallKind IsADLCandidate=ADLCallKind::NotADL, OverloadCandidateParamOrder PO={})
Add a C++ function template specialization as a candidate in the candidate set, using template argume...
void AddFunctionCandidates(const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, bool SuppressUserConversions=false, bool PartialOverloading=false, bool FirstArgumentIsBase=false)
Add all of the function declarations in the given function set to the overload candidate set.
void setFunctionHasMustTail()
DeviceDiagnosticReason getEmissionReason(const FunctionDecl *Decl)
CXXRecordDecl * createLambdaClosureType(SourceRange IntroducerRange, TypeSourceInfo *Info, unsigned LambdaDependencyKind, LambdaCaptureDefault CaptureDefault)
Create a new lambda closure type.
void setRoundingMode(SourceLocation Loc, llvm::RoundingMode)
Called to set constant rounding mode for floating point operations.
BoundTypeDiagnoser(unsigned DiagID, const Ts &...Args)
void CodeCompletePreprocessorExpression()
@ UPPC_Lambda
Lambda expression.
ExprResult BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default a...
@ AcceptSizeless
Relax the normal rules for complete types so that they include sizeless built-in types.
void ActOnStartCXXMemberDeclarations(Scope *S, Decl *TagDecl, SourceLocation FinalLoc, bool IsFinalSpelledSealed, bool IsAbstract, SourceLocation LBraceLoc)
ActOnStartCXXMemberDeclarations - Invoked when we have parsed a C++ record definition's base-specifie...
bool buildCoroutineParameterMoves(SourceLocation Loc)
ExprResult ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand)
ActOnCXXDelete - Parsed a C++ 'delete' expression.
QualType CheckMatrixMultiplyOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign)
static StringRef getPrintable(StringRef S)
void PrintInstantiationStack()
Prints the current instantiation stack through a series of notes.
void BuildBasePathArray(const CXXBasePaths &Paths, CXXCastPath &BasePath)
TypeSourceInfo * SubstAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto, QualType Replacement)
Substitute Replacement for auto in TypeWithAuto.
ObjCLiteralKind CheckLiteralKind(Expr *FromE)
QualType UsualArithmeticConversions(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, ArithConvKind ACK)
UsualArithmeticConversions - Performs various conversions that are common to binary operators (C99 6....
void notePreviousDefinition(const NamedDecl *Old, SourceLocation New)
a linked list of methods with the same selector name but different signatures.
void ActOnFields(Scope *S, SourceLocation RecLoc, Decl *TagDecl, ArrayRef< Decl * > Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &AttrList)
NonTagKind
Common ways to introduce type names without a tag for use in diagnostics.
bool isEmptyCudaDestructor(SourceLocation Loc, CXXDestructorDecl *CD)
StmtResult ActOnOpenMPScanDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp scan'.
void AddBuiltinCandidate(QualType *ParamTys, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool IsAssignmentOperator=false, unsigned NumContextualBoolArguments=0)
AddBuiltinCandidate - Add a candidate for a built-in operator.
Encapsulates the data about a macro definition (e.g.
DeclResult ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization)
void * SkippedDefinitionContext
void setLastDiagnosticIgnored(bool Ignored)
Pretend that the last diagnostic issued was ignored, so any subsequent notes will be suppressed,...
DeclGroupPtrTy ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc)
The parser has processed a private-module-fragment declaration that begins the definition of the priv...
void ActOnReenterCXXMethodParameter(Scope *S, ParmVarDecl *Param)
This is used to implement the constant expression evaluation part of the attribute enable_if extensio...
bool DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD, SourceLocation ReturnLoc, Expr *&RetExpr, const AutoType *AT)
Deduce the return type for a function from a returned expression, per C++1y [dcl.spec....
void diagnose(Sema &S, SourceLocation Loc, QualType T) override
void DiagnoseOwningPropertyGetterSynthesis(const ObjCImplementationDecl *D)
StmtResult ActOnOpenMPTaskgroupDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskgroup'.
bool isLaxVectorConversion(QualType srcType, QualType destType)
Is this a legal conversion between two types, one of which is known to be a vector type?
OMPClause * ActOnOpenMPAcqRelClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'acq_rel' clause.
bool checkInitMethod(ObjCMethodDecl *method, QualType receiverTypeIfCall)
Check whether the given method, which must be in the 'init' family, is a valid member of that family.
void CodeCompleteObjCPassingType(Scope *S, ObjCDeclSpec &DS, bool IsParameter)
AccessResult CheckAllocationAccess(SourceLocation OperatorLoc, SourceRange PlacementRange, CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, bool Diagnose=true)
Checks access to an overloaded operator new or delete.
ExprResult BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound=nullptr)
BuildOverloadedArrowExpr - Build a call to an overloaded operator-> (if one exists),...
@ None
Allow no explicit functions to be used.
void CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record)
Perform semantic checks on a class definition that has been completing, introducing implicitly-declar...
void AddMsStructLayoutForRecord(RecordDecl *RD)
AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
TemplateName getTemplateName() const
ObjCSubscriptKind CheckSubscriptingKind(Expr *FromE)
CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being don...
LazyVector< TypedefNameDecl *, ExternalSemaSource, &ExternalSemaSource::ReadExtVectorDecls, 2, 2 > ExtVectorDeclsType
void ActOnFinishCXXInClassMemberInitializer(Decl *VarDecl, SourceLocation EqualLoc, Expr *Init)
This is invoked after parsing an in-class initializer for a non-static C++ class member,...
@ PotentiallyEvaluatedIfUsed
The current expression is potentially evaluated, but any declarations referenced inside that expressi...
void startOpenMPLoop()
If the current region is a loop-based region, mark the start of the loop construct.
static bool isCast(CheckedConversionKind CCK)
void ActOnPragmaFPEvalMethod(SourceLocation Loc, LangOptions::FPEvalMethodKind Value)
Expr * FixOverloadedFunctionReference(Expr *E, DeclAccessPair FoundDecl, FunctionDecl *Fn)
FixOverloadedFunctionReference - E is an expression that refers to a C++ overloaded function (possibl...
void DefineImplicitCopyConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
DefineImplicitCopyConstructor - Checks for feasibility of defining this constructor as the copy const...
virtual void ReadUnusedFileScopedDecls(SmallVectorImpl< const DeclaratorDecl * > &Decls)
Read the set of unused file-scope declarations known to the external Sema source.
TypeResult ActOnDependentTag(Scope *S, unsigned TagSpec, TagUseKind TUK, const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation TagLoc, SourceLocation NameLoc)
llvm::SmallSet< SourceLocation, 2 > SrcLocSet
bool IsMemberPointerConversion(Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType)
IsMemberPointerConversion - Determines whether the conversion of the expression From,...
AlignPackInfo CurrentValue
ExprResult ActOnFinishTrailingRequiresClause(ExprResult ConstraintExpr)
void CodeCompleteObjCSelector(Scope *S, ArrayRef< IdentifierInfo * > SelIdents)
QualType BuildPointerType(QualType T, SourceLocation Loc, DeclarationName Entity)
Build a pointer type.
bool CheckAttrNoArgs(const ParsedAttr &CurrAttr)
bool isEquivalentInternalLinkageDeclaration(const NamedDecl *A, const NamedDecl *B)
Determine if A and B are equivalent internal linkage declarations from different modules,...
void UnmarkAsLateParsedTemplate(FunctionDecl *FD)
AssignConvertType CheckTransparentUnionArgumentConstraints(QualType ArgType, ExprResult &RHS)
ExprResult checkPseudoObjectAssignment(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opcode, Expr *LHS, Expr *RHS)
ExprResult BuildCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
BuildCallExpr - Handle a call to Fn with the specified array of arguments.
EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Sema::ReuseLambdaContextDecl_t, Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext=Sema::ExpressionEvaluationContextRecord::EK_Other)
bool hasCStrMethod(const Expr *E)
Check to see if a given expression could have '.c_str()' called on it.
ExprResult ActOnCXXNullPtrLiteral(SourceLocation Loc)
ActOnCXXNullPtrLiteral - Parse 'nullptr'.
ExprResult BuildObjCArrayLiteral(SourceRange SR, MultiExprArg Elements)
ExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc, tok::TokenKind Kind, Expr *Input)
GlobalMethodPool MethodPool
Method Pool - allows efficient lookup when typechecking messages to "id".
static const IdentifierInfo * getPrintable(const IdentifierInfo *II)
Decl * ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool ImplKind, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind)
ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property ...
@ AP_Explicit
The availability attribute was specified explicitly next to the declaration.
std::vector< std::unique_ptr< TemplateInstantiationCallback > > TemplateInstCallbacks
The template instantiation callbacks to trace or track instantiations (objects can be chained).
Represents a C++ nested-name-specifier or a global scope specifier.
bool isSimpleTypeSpecifier(tok::TokenKind Kind) const
Determine whether the token kind starts a simple-type-specifier.
bool isComputedNoexcept(ExceptionSpecificationType ESpecType)
void ActOnFinishFunctionDeclarationDeclarator(Declarator &D)
Called after parsing a function declarator belonging to a function declaration.
bool IsOverload(FunctionDecl *New, FunctionDecl *Old, bool IsForUsingDecl, bool ConsiderCudaAttrs=true, bool ConsiderRequiresClauses=true)
void ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange)
FunctionEmissionStatus
Status of the function emission on the CUDA/HIP/OpenMP host/device attrs.
QualType getCapturedDeclRefType(VarDecl *Var, SourceLocation Loc)
Given a variable, determine the type that a reference to that variable will have in the given scope.
@ TDK_SubstitutionFailure
Substitution of the deduced template argument values resulted in an error.
Describes how types, statements, expressions, and declarations should be printed.
const ObjCMethodDecl * SelectorsForTypoCorrection(Selector Sel, QualType ObjectType=QualType())
DeclarationNameInfo GetNameFromUnqualifiedId(const UnqualifiedId &Name)
Retrieves the declaration name from a parsed unqualified-id.
void DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullType, bool IsEqual, SourceRange Range)
Diagnose pointers that are always non-null.
@ NTCUC_DefaultInitializedObject
void ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope)
ActOnStartOfLambdaDefinition - This is called just before we start parsing the body of a lambda; it a...
ExprResult BuildCallToMemberFunction(Scope *S, Expr *MemExpr, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
BuildCallToMemberFunction - Build a call to a member function.
@ CCK_FunctionalCast
A functional-style cast.
void ActOnObjCReenterContainerContext(DeclContext *DC)
unsigned LastEmittedCodeSynthesisContextDepth
The depth of the context stack at the point when the most recent error or warning was produced.
bool LookupBuiltin(LookupResult &R)
Lookup a builtin function, when name lookup would otherwise fail.
OMPClause * ActOnOpenMPThreadsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'threads' clause.
NameClassificationKind getKind() const
void DiscardMisalignedMemberAddress(const Type *T, Expr *E)
This function checks if the expression is in the sef of potentially misaligned members and it is conv...
Represents a C++ Modules TS module export declaration.
llvm::SetVector< Decl * > & syclDeviceDecls()
FieldDecl * BuildCaptureField(RecordDecl *RD, const sema::Capture &Capture)
Build a FieldDecl suitable to hold the given capture.
void StartOpenMPDSABlock(OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc)
Called on start of new data sharing attribute block.
void maybeExtendBlockObject(ExprResult &E)
Do an explicit extend of the given block pointer if we're in ARC.
@ FirstDecl
Parsing the first decl in a TU.
@ LookupOMPMapperName
Look up the name of an OpenMP user-defined mapper.
NamespaceDecl * getStdNamespace() const
bool IsStringInit(Expr *Init, const ArrayType *AT)
@ CudaDevice
CUDA specific diagnostics.
@ TryCapture_ExplicitByRef
@ CCEK_ArrayBound
Array bound in array declarator or new-expression.
SuppressedDiagnosticsMap SuppressedDiagnostics
MemInitResult BuildMemberInitializer(ValueDecl *Member, Expr *Init, SourceLocation IdLoc)
bool CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, TemplateArgumentLoc &Arg, SmallVectorImpl< TemplateArgument > &Converted)
Describes the sequence of initializations required to initialize a given object or reference with a s...
void ActOnPragmaMSSection(SourceLocation PragmaLocation, int SectionFlags, StringLiteral *SegmentName)
Called on well formed #pragma section().
void CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC)
CheckConversionDeclarator - Called by ActOnDeclarator to check the well-formednes of the conversion f...
OMPClause * ActOnOpenMPMapClause(ArrayRef< OpenMPMapModifierKind > MapTypeModifiers, ArrayRef< SourceLocation > MapTypeModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, bool NoDiagnose=false, ArrayRef< Expr * > UnresolvedMappers=llvm::None)
Called on well-formed 'map' clause.
void DiagnoseHiddenVirtualMethods(CXXMethodDecl *MD)
Diagnose methods which overload virtual methods in a base class without overriding any.
PreferredTypeBuilder(bool Enabled)
ExprResult ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc)
FunctionType - C99 6.7.5.3 - Function Declarators.
bool ActOnCXXGlobalScopeSpecifier(SourceLocation CCLoc, CXXScopeSpec &SS)
The parser has parsed a global nested-name-specifier '::'.
SmallVector< ExpressionEvaluationContextRecord, 8 > ExprEvalContexts
A stack of expression evaluation contexts.
Represents a variable template specialization, which refers to a variable template with a given set o...
DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveEnd(Scope *S, DeclGroupPtrTy DeclReductions, bool IsValid)
Called at the end of '#pragma omp declare reduction'.
void AddAnyMethodToGlobalPool(Decl *D)
AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool.
ExprResult BuildCXXFunctionalCastExpr(TypeSourceInfo *TInfo, QualType Type, SourceLocation LParenLoc, Expr *CastExpr, SourceLocation RParenLoc)
@ AFS_Global
Only look for allocation functions in the global scope.
StmtResult FinishObjCForCollectionStmt(Stmt *ForCollection, Stmt *Body)
FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement.
QualType ProduceTemplateArgumentSignatureHelp(TemplateTy, ArrayRef< ParsedTemplateArgument >, SourceLocation LAngleLoc)
void CodeCompleteObjCAtStatement(Scope *S)
StmtResult ActOnOpenMPBarrierDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp barrier'.
Represents the body of a CapturedStmt, and serves as its DeclContext.
~SynthesizedFunctionScope()
MSVtorDispMode
In the Microsoft ABI, this controls the placement of virtual displacement members used to implement v...
void ActOnPragmaAttributeEmptyPush(SourceLocation PragmaLoc, const IdentifierInfo *Namespace)
Retains information about a block that is currently being parsed.
sema::CapturedRegionScopeInfo * getCurCapturedRegion()
Retrieve the current captured region, if any.
@ LookupLabel
Label name lookup.
void CheckCastAlign(Expr *Op, QualType T, SourceRange TRange)
CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment req...
Token - This structure provides full information about a lexed token.
SYCLIntelFPGALoopCountAttr * BuildSYCLIntelFPGALoopCountAttr(const AttributeCommonInfo &CI, Expr *E)
void MarkUnusedFileScopedDecl(const DeclaratorDecl *D)
If it's a file scoped decl that must warn if not used, keep track of it.
void ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind)
TemplateParamListContext
The context in which we are checking a template parameter list.
BTFDeclTagAttr * mergeBTFDeclTagAttr(Decl *D, const BTFDeclTagAttr &AL)
ExprResult BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, sema::LambdaScopeInfo *LSI)
Complete a lambda-expression having processed and attached the lambda body.
bool DiagnoseClassNameShadow(DeclContext *DC, DeclarationNameInfo Info)
DiagnoseClassNameShadow - Implement C++ [class.mem]p13: If T is the name of a class,...
void AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversion=false, OverloadCandidateParamOrder PO={})
AddMethodCandidate - Adds a named decl (which is some kind of method) as a method candidate to the gi...
bool FindDeallocationFunction(SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true)
ExprResult BuildLiteralOperatorCall(LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef< Expr * > Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to a literal operator descri...
ObjCProtocolDecl * LookupProtocol(IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=NotForRedeclaration)
Find the protocol with the given name, if any.
static NameClassification TypeTemplate(TemplateName Name)
The name of a declaration.
void ActOnTypedefedProtocols(SmallVectorImpl< Decl * > &ProtocolRefs, SmallVectorImpl< SourceLocation > &ProtocolLocs, IdentifierInfo *SuperName, SourceLocation SuperLoc)
ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualifi...
@ LOLR_Error
The lookup resulted in an error.
void CheckPtrComparisonWithNullChar(ExprResult &E, ExprResult &NullE)
SmallVector< attr::SubjectMatchRule, 4 > MatchRules
Syntax
The style used to specify an attribute.
static NameClassification UndeclaredNonType()
bool CollectStats
Flag indicating whether or not to collect detailed statistics.
bool isInOpenMPAssumeScope() const
Check if there is an active global omp begin assumes directive.
std::deque< PendingImplicitInstantiation > PendingInstantiations
The queue of implicit template instantiations that are required but have not yet been performed.
SmallVector< VarDecl *, 4 > ExternalDeclarations
All the external declarations encoutered and used in the TU.
StmtResult ActOnOpenMPInteropDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp interop'.
OMPClause * ActOnOpenMPAffinityClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, Expr *Modifier, ArrayRef< Expr * > Locators)
Called on well-formed 'affinity' clause.
void DiagnoseUnusedButSetDecl(const VarDecl *VD)
If VD is set but not otherwise used, diagnose, for a parameter or a variable.
ExprResult BuildCXXFoldExpr(UnresolvedLookupExpr *Callee, SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc, Optional< unsigned > NumExpansions)
StmtResult ActOnOpenMPParallelMasterTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel master taskloop' after parsing of the associated statemen...
OMPClause * ActOnOpenMPCopyinClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'copyin' clause.
@ IntToPointer
IntToPointer - The assignment converts an int to a pointer, which we accept as an extension.
void setExceptionMode(SourceLocation Loc, LangOptions::FPExceptionModeKind)
Called to set exception behavior for floating point operations.
void EnterTemplatedContext(Scope *S, DeclContext *DC)
Enter a template parameter scope, after it's been associated with a particular DeclContext.
ArrayRef< std::pair< IdentifierInfo *, SourceLocation > > ModuleIdPath
A sequence of identifier/location pairs used to describe a particular module or submodule,...
ExprResult BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, SourceLocation Loc)
Construct a new expression that refers to the given integral template argument with the given source-...
void ActOnPragmaWeakID(IdentifierInfo *WeakName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc)
ActOnPragmaWeakID - Called on well formed #pragma weak ident.
llvm::DenseMap< CXXRecordDecl *, bool > VTablesUsed
The set of classes whose vtables have been used within this translation unit, and a bit that will be ...
void ActOnPragmaFEnvAccess(SourceLocation Loc, bool IsEnabled)
ActOnPragmaFenvAccess - Called on well formed #pragma STDC FENV_ACCESS.
A RAII object to enter scope of a compound statement.
void checkUnsafeExprAssigns(SourceLocation Loc, Expr *LHS, Expr *RHS)
checkUnsafeExprAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained expressi...
SmallVector< Module *, 16 > CodeSynthesisContextLookupModules
Extra modules inspected when performing a lookup during a template instantiation.
void ActOnBlockError(SourceLocation CaretLoc, Scope *CurScope)
ActOnBlockError - If there is an error parsing a block, this callback is invoked to pop the informati...
A diagnostic message which has been conditionally emitted pending the complete parsing of the current...
Retains information about a captured region.
void FilterAcceptableTemplateNames(LookupResult &R, bool AllowFunctionTemplates=true, bool AllowDependent=true)
OMPClause * ActOnOpenMPCollapseClause(Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'collapse' clause.
ExprResult ActOnClassMessage(Scope *S, ParsedType Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
void CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC)
bool isUnevaluatedContext() const
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.
CXXMethodDecl * DeclareImplicitMoveAssignment(CXXRecordDecl *ClassDecl)
Declare the implicit move assignment operator for the given class.
iterator find(Selector Sel)
Decl * ActOnFinishLinkageSpecification(Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc)
ActOnFinishLinkageSpecification - Complete the definition of the C++ linkage specification LinkageSpe...
bool CheckCaseExpression(Expr *E)
This class handles loading and caching of source files into memory.
ProcessingContextState ParsingClassState
FPOptionsOverride getOverrides()
bool isInOpenMPDeclareVariantScope() const
Can we exit an OpenMP declare variant scope at the moment.
bool CheckOverridingFunctionReturnType(const CXXMethodDecl *New, const CXXMethodDecl *Old)
CheckOverridingFunctionReturnType - Checks whether the return types are covariant,...
StmtResult ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, unsigned NumLabels, SourceLocation RParenLoc)
void MarkVirtualBaseDestructorsReferenced(SourceLocation Location, CXXRecordDecl *ClassDecl, llvm::SmallPtrSetImpl< const RecordType * > *DirectVirtualBases=nullptr)
Mark destructors of virtual bases of this class referenced.
bool CheckDistantExceptionSpec(QualType T)
CheckDistantExceptionSpec - Check if the given type is a pointer or pointer to member to a function w...
@ CCK_OtherCast
A cast other than a C-style cast.
void ActOnDocumentableDecls(ArrayRef< Decl * > Group)
Decl * ActOnUsingDeclaration(Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList)
void HandleDependentAccessCheck(const DependentDiagnostic &DD, const MultiLevelTemplateArgumentList &TemplateArgs)
bool DiagnoseDependentMemberLookup(LookupResult &R)
Diagnose a lookup that found results in an enclosing class during error recovery.
void ActOnTranslationUnitScope(Scope *S)
ParsedAttributesView ArgAttrs
ArgAttrs - Attribute list for this argument.
StmtResult ActOnOpenMPCriticalDirective(const DeclarationNameInfo &DirName, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp critical' after parsing of the associated statement.
void RegisterTypeTagForDatatype(const IdentifierInfo *ArgumentKind, uint64_t MagicValue, QualType Type, bool LayoutCompatible, bool MustBeNull)
Register a magic integral constant to be used as a type tag.
ExprResult CheckUnevaluatedOperand(Expr *E)
@ NC_Unknown
This name is not a type or template in this context, but might be something else.
QualType BuildAddressSpaceAttr(QualType &T, LangAS ASIdx, Expr *AddrSpace, SourceLocation AttrLoc)
BuildAddressSpaceAttr - Builds a DependentAddressSpaceType if an expression is uninstantiated.
bool isAlreadyInstantiating() const
Determine whether we are already instantiating this specialization in some surrounding active instant...
Decl * ActOnCompatibilityAlias(SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation)
ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias decl...
ExprResult BuildCXXUuidof(QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
Build a Microsoft __uuidof expression with a type operand.
The base class of the type hierarchy.
bool RebuildingImmediateInvocation
Whether the AST is currently being rebuilt to correct immediate invocations.
@ IncompatibleObjCQualifiedId
IncompatibleObjCQualifiedId - The assignment is between a qualified id type and something else (that ...
bool CheckNontrivialField(FieldDecl *FD)
TypeSourceInfo * GetTypeForDeclaratorCast(Declarator &D, QualType FromTy)
void ActOnPragmaOptimize(bool On, SourceLocation PragmaLoc)
Called on well formed #pragma clang optimize.
ExprResult BuildInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
@ UPPC_ExceptionType
The type of an exception.
unsigned LayoutCompatible
If true, Type should be compared with other expression's types for layout-compatibility.
@ Switch
An integral condition for a 'switch' statement.
ExprResult BuildFieldReferenceExpr(Expr *BaseExpr, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, FieldDecl *Field, DeclAccessPair FoundDecl, const DeclarationNameInfo &MemberNameInfo)
@ UPPC_TypeConstraint
A type constraint.
SynthesisKind
The kind of template instantiation we are performing.
StmtResult ActOnDoStmt(SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation CondLParen, Expr *Cond, SourceLocation CondRParen)
std::unique_ptr< CXXFieldCollector > FieldCollector
FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
@ TU_Prefix
The translation unit is a prefix to a translation unit, and is not complete.
void CodeCompleteNamespaceDecl(Scope *S)
@ NotForRedeclaration
The lookup is a reference to this name that is not for the purpose of redeclaring the name.
StmtResult ActOnOpenMPCancelDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Called on well-formed '#pragma omp cancel'.
ExprResult ActOnStringLiteral(ArrayRef< Token > StringToks, Scope *UDLScope=nullptr)
ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e....
FunctionDecl * ResolveAddressOfOverloadedFunction(Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=nullptr)
ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over....
ExprResult ActOnSYCLBuiltinFieldTypeExpr(ParsedType PT, Expr *Idx)
Get a value based on the type of the given field number so that callers can wrap it in a decltype() t...
virtual SemaDiagnosticBuilder diagnoseAmbiguous(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic when there are multiple possible conversion functions.
void ActOnDefs(Scope *S, Decl *TagD, SourceLocation DeclStart, IdentifierInfo *ClassName, SmallVectorImpl< Decl * > &Decls)
Called whenever @defs(ClassName) is encountered in the source.
SmallVector< ExprWithCleanups::CleanupObject, 8 > ExprCleanupObjects
ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current f...
Represents a class type in Objective C.
void finalizeSYCLDelayedAnalysis(const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc, DeviceDiagnosticReason Reason)
Finishes analysis of the deferred functions calls that may be not properly declared for device compil...
bool MatchTwoMethodDeclarations(const ObjCMethodDecl *Method, const ObjCMethodDecl *PrevMethod, MethodMatchStrategy strategy=MMS_strict)
MatchTwoMethodDeclarations - Checks if two methods' type match and returns true, or false,...
RAII class used to determine whether SFINAE has trapped any errors that occur during template argumen...
void ActOnTagFinishSkippedDefinition(SkippedDefinitionContext Context)
void DefineImplicitDestructor(SourceLocation CurrentLocation, CXXDestructorDecl *Destructor)
DefineImplicitDestructor - Checks for feasibility of defining this destructor as the default destruct...
FullExprArg MakeFullDiscardedValueExpr(Expr *Arg)
void PushNamespaceVisibilityAttr(const VisibilityAttr *Attr, SourceLocation Loc)
PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.
void addSYCLIntelPipeIOAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ID)
addSYCLIntelPipeIOAttr - Adds a pipe I/O attribute to a particular declaration.
Decl * ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList)
ParsingClassState PushParsingClass()
bool CheckCallReturnType(QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD)
CheckCallReturnType - Checks that a call expression's return type is complete.
void MarkVirtualMembersReferenced(SourceLocation Loc, const CXXRecordDecl *RD, bool ConstexprOnly=false)
MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced.
bool inferCUDATargetForImplicitSpecialMember(CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose)
Given a implicit special member, infer its CUDA target from the calls it needs to make to underlying ...
bool WarnedStackExhausted
A collection of diagnostics which were delayed.
bool checkFinalSuspendNoThrow(const Stmt *FinalSuspend)
Check that the expression co_await promise.final_suspend() shall not be potentially-throwing.
void checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init)
Check that the lifetime of the initializer (and its subobjects) is sufficient for initializing the en...
StmtResult ActOnOpenMPExecutableDirective(OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
void DiagnoseDeprecatedAttribute(const ParsedAttr &A, StringRef NewScope, StringRef NewName)
Emit a diagnostic about the given attribute having a deprecated name, and also emit a fixit hint to g...
bool DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=nullptr)
DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specifi...
SemaDiagnosticBuilder CUDADiagIfDeviceCode(SourceLocation Loc, unsigned DiagID)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
void checkClassLevelDLLAttribute(CXXRecordDecl *Class)
Check class-level dllimport/dllexport attribute.
std::string getAmbiguousPathsDisplayString(CXXBasePaths &Paths)
Builds a string representing ambiguous paths from a specific derived class to different subobjects of...
void AddPragmaAttributes(Scope *S, Decl *D)
Adds the attributes that have been specified using the '#pragma clang attribute push' directives to t...
StmtResult ActOnOpenMPMasterTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp master taskloop simd' after parsing of the associated statement.
ExprResult PerformContextuallyConvertToObjCPointer(Expr *From)
PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to a...
Annotates a diagnostic with some code that should be inserted, removed, or replaced to fix the proble...
ObjCContainerKind getObjCContainerKind() const
@ DefaultTemplateArgumentInstantiation
We are instantiating a default argument for a template parameter.
FieldDecl * CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitfieldWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D=nullptr)
Build a new FieldDecl and check its well-formedness.
StmtResult ActOnOpenMPDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute parallel for simd' after parsing of the associated stat...
bool CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *MD, DefaultedComparisonKind DCK)
A little helper class (which is basically a smart pointer that forwards info from DiagnosticsEngine) ...
@ OperatorInExpression
The '<=>' operator was used in an expression and a builtin operator was selected.
SmallVectorImpl< Decl * > & WeakTopLevelDecls()
WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
const LangOptions & getLangOpts() const
void CheckConstructor(CXXConstructorDecl *Constructor)
CheckConstructor - Checks a fully-formed constructor for well-formedness, issuing any diagnostics req...
void AddWorkGroupSizeHintAttr(Decl *D, const AttributeCommonInfo &CI, Expr *XDim, Expr *YDim, Expr *ZDim)
bool CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, Optional< unsigned > &NumExpansions)
Determine whether we could expand a pack expansion with the given set of parameter packs into separat...
bool MergeCompatibleFunctionDecls(FunctionDecl *New, FunctionDecl *Old, Scope *S, bool MergeTypeWithOld)
Completes the merge of two function declarations that are known to be compatible.
bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID)
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
void NoteHiddenVirtualMethods(CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
void CodeCompleteObjCPropertyGetter(Scope *S)
QualType CheckMatrixElementwiseOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign)
Type checking for matrix binary operators.
bool DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc)
static SourceRange getPrintable(const Expr *E)
OMPClause * ActOnOpenMPRelaxedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'relaxed' clause.
void setMethod(CXXMethodDecl *MD)
@ PCC_ParenthesizedExpression
Code completion occurs in a parenthesized expression, which might also be a type cast.
void ActOnStartFunctionDeclarationDeclarator(Declarator &D, unsigned TemplateParameterDepth)
Called before parsing a function declarator belonging to a function declaration.
OMPClause * ActOnOpenMPNontemporalClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'nontemporal' clause.
void AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI, ParameterABI ABI)
NamespaceDecl * getCachedCoroNamespace()
SmallVector< LambdaExpr *, 2 > Lambdas
The lambdas that are present within this context, if it is indeed an unevaluated context.
ExprResult BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc)
__builtin_offsetof(type, a.b[123][456].c)
ExprResult BuildOverloadedCallExpr(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool AllowTypoCorrection=true, bool CalleesAddressIsTaken=false)
BuildOverloadedCallExpr - Given the call expression that calls Fn (which eventually refers to the dec...
bool DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync)
Do a check to make sure Name looks like a legal argument for the swift_name attribute applied to decl...
uint32_t Literal
Literals are represented as positive integers.
bool checkNSReturnsRetainedReturnType(SourceLocation loc, QualType type)
@ Equal
This is an operator== that should be implemented as a series of subobject comparisons.
void AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE)
AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular declaration.
Decl * ActOnFinishFunctionBody(Decl *Decl, Stmt *Body)
void ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope)
ActOnBlockArguments - This callback allows processing of block arguments.
IdentifierInfo * getSuperIdentifier() const
SmallVector< CXXBaseSpecifier *, 4 > CXXCastPath
A simple array of base specifiers.
DeclContext * getCurLexicalContext() const
@ CTAK_DeducedFromArrayBound
The template argument was deduced from an array bound via template argument deduction.
@ LookupTagName
Tag name lookup, which finds the names of enums, classes, structs, and unions.
CallExpr::ADLCallKind ADLCallKind
void CodeCompleteObjCAtDirective(Scope *S)
bool IsComplexPromotion(QualType FromType, QualType ToType)
Determine if a conversion is a complex promotion.
VariadicCallType getVariadicCallType(FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn)
llvm::PointerIntPair< ConstantExpr *, 1 > ImmediateInvocationCandidate
void CodeCompleteUsing(Scope *S)
ExprResult ActOnArraySubscriptExpr(Scope *S, Expr *Base, SourceLocation LLoc, MultiExprArg ArgExprs, SourceLocation RLoc)
OpenMPLastprivateModifier
OpenMP 'lastprivate' clause modifier.
VarTemplateSpecializationDecl * BuildVarTemplateInstantiation(VarTemplateDecl *VarTemplate, VarDecl *FromVar, const TemplateArgumentList &TemplateArgList, const TemplateArgumentListInfo &TemplateArgsInfo, SmallVectorImpl< TemplateArgument > &Converted, SourceLocation PointOfInstantiation, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *StartingScope=nullptr)
FunctionDecl * getCurFunctionDecl(bool AllowLambda=false)
Returns a pointer to the innermost enclosing function, or nullptr if the current context is not insid...
OpenMPBindClauseKind
OpenMP bindings for the 'bind' clause.
PoppedFunctionScopeDeleter(Sema *Self)
ImplicitExceptionSpecification(Sema &Self)
void CheckForFunctionRedefinition(FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr, SkipBodyInfo *SkipBody=nullptr)
QualType CheckBitwiseOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
Decl * ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, SkipBodyInfo *SkipBody=nullptr)
This is invoked when we see 'struct foo' or 'struct {'.
@ LookupMemberName
Member name lookup, which finds the names of class/struct/union members.
void ActOnTagDefinitionError(Scope *S, Decl *TagDecl)
ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a t...
TemplateName SubstTemplateName(NestedNameSpecifierLoc QualifierLoc, TemplateName Name, SourceLocation Loc, const MultiLevelTemplateArgumentList &TemplateArgs)
void addAMDGPUFlatWorkGroupSizeAttr(Decl *D, const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
addAMDGPUFlatWorkGroupSizeAttr - Adds an amdgpu_flat_work_group_size attribute to a particular declar...
void CodeCompleteIncludedFile(llvm::StringRef Dir, bool IsAngled)
DelayedDiagnosticsState push(sema::DelayedDiagnosticPool &pool)
Enter a new scope.
const TemplateArgument * TemplateArgs
The list of template arguments we are substituting, if they are not part of the entity.
Declaration of a template function.
bool RequireCompleteType(SourceLocation Loc, QualType T, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
Ensure that the type T is a complete type.
ObjCMethodDecl * StringWithUTF8StringMethod
The declaration of the stringWithUTF8String: method.
virtual SemaDiagnosticBuilder diagnoseExplicitConv(Sema &S, SourceLocation Loc, QualType T, QualType ConvTy)=0
Emits a diagnostic when the only matching conversion function is explicit.
DeclGroupPtrTy ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, ModuleIdPath Partition, ModuleImportState &ImportState)
The parser has processed a module-declaration that begins the definition of a module interface or imp...
bool CheckTollFreeBridgeStaticCast(QualType castType, Expr *castExpr, CastKind &Kind)
OMPClause * ActOnOpenMPUseDeviceAddrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'use_device_addr' clause.
ObjCInterfaceDecl * NSArrayDecl
The declaration of the Objective-C NSArray class.
bool CheckDerivedToBaseConversion(QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath=nullptr, bool IgnoreAccess=false)
llvm::SmallVector< ImmediateInvocationCandidate, 4 > ImmediateInvocationCandidates
Set of candidates for starting an immediate invocation.
void DiagnoseInvalidJumps(Stmt *Body)
void DiagnoseMissingDesignatedInitOverrides(const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD)
friend StmtResult StmtError(const SemaDiagnosticBuilder &)
ExprResult CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg Args)
void copySYCLKernelAttrs(const CXXRecordDecl *KernelObj)
void LookupVisibleDecls(Scope *S, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true, bool LoadExternal=true)
QualType CheckRemainderOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false)
@ TAH_IgnoreTrivialABI
The triviality of a method unaffected by "trivial_abi".
bool CheckVecStepExpr(Expr *E)
OMPClause * ActOnOpenMPOrderClause(OpenMPOrderClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'order' clause.
void ActOnLambdaError(SourceLocation StartLoc, Scope *CurScope, bool IsInstantiation=false)
ActOnLambdaError - If there is an error parsing a lambda, this callback is invoked to pop the informa...
ExprResult BuildAnonymousStructUnionMemberReference(const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, DeclAccessPair FoundDecl=DeclAccessPair::make(nullptr, AS_none), Expr *baseObjectExpr=nullptr, SourceLocation opLoc=SourceLocation())
bool tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads)
Figure out if an expression could be turned into a call.
@ ImportFinished
after any non-import decl.
@ NC_OverloadSet
The name was classified as an overload set, and an expression representing that overload set has been...
void AddIntelFPGAMaxReplicatesAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
ExprResult BuildSYCLUniqueStableIdExpr(SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, Expr *E)
concepts::Requirement * ActOnNestedRequirement(Expr *Constraint)
OMPClause * ActOnOpenMPSIMDClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'simd' clause.
QualType BuildParenType(QualType T)
Build a paren type including T.
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
unsigned NonInstantiationEntries
The number of CodeSynthesisContexts that are not template instantiations and, therefore,...
ExprResult BuildCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating the default expr if needed.
void ActOnOpenMPBeginDeclareVariant(SourceLocation Loc, OMPTraitInfo &TI)
Handle a omp begin declare variant.
SYCLUsesAspectsAttr * MergeSYCLUsesAspectsAttr(Decl *D, const SYCLUsesAspectsAttr &A)
NamedDecl * getShadowedDeclaration(const TypedefNameDecl *D, const LookupResult &R)
Return the declaration shadowed by the given typedef D, or null if it doesn't shadow any declaration ...
SourceLocation IdentifierLoc
The location of the identifier.
const internal::VariadicAllOfMatcher< Attr > attr
Matches attributes.
ParameterABI
Kinds of parameter ABI.
ObjCMethodDecl * LookupMethodInQualifiedType(Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance)
LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective...
sema::LambdaScopeInfo * getEnclosingLambda() const
Get the innermost lambda enclosing the current location, if any.
StmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc, SourceLocation RParen, Decl *Parm, Stmt *Body)
ExprResult BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, Optional< Expr * > ArraySize, SourceRange DirectInitRange, Expr *Initializer)
ExprResult RebuildExprInCurrentInstantiation(Expr *E)
bool isPreciseFPEnabled()
Are precise floating point semantics currently enabled?
ExprResult BuildIvarRefExpr(Scope *S, SourceLocation Loc, ObjCIvarDecl *IV)
MultiLevelTemplateArgumentList getTemplateInstantiationArgs(const NamedDecl *D, const TemplateArgumentList *Innermost=nullptr, bool RelativeToPrimary=false, const FunctionDecl *Pattern=nullptr)
Retrieve the template argument list(s) that should be used to instantiate the definition of the given...
bool isQualifiedMemberAccess(Expr *E)
Determine whether the given expression is a qualified member access expression, of a form that could ...
@ UnevaluatedList
The current expression occurs within a braced-init-list within an unevaluated operand.
NamedDecl * Template
The template (or partial specialization) in which we are performing the instantiation,...
SmallVector< std::pair< const CXXMethodDecl *, const CXXMethodDecl * >, 2 > DelayedOverridingExceptionSpecChecks
All the overriding functions seen during a class definition that had their exception spec checks dela...
OMPClause * ActOnOpenMPVarListClause(OpenMPClauseKind Kind, ArrayRef< Expr * > Vars, Expr *DepModOrTailExpr, const OMPVarListLocTy &Locs, SourceLocation ColonLoc, CXXScopeSpec &ReductionOrMapperIdScopeSpec, DeclarationNameInfo &ReductionOrMapperId, int ExtraModifier, ArrayRef< OpenMPMapModifierKind > MapTypeModifiers, ArrayRef< SourceLocation > MapTypeModifiersLoc, bool IsMapTypeImplicit, SourceLocation ExtraModifierLoc, ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc)
DeclResult CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs)
Get the specialization of the given variable template corresponding to the specified argument list,...
ObjCMethodDecl * ValueWithBytesObjCTypeMethod
The declaration of the valueWithBytes:objCType: method.
bool ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS)
bool hasTemplateKeyword() const
ExprResult ActOnObjCAvailabilityCheckExpr(llvm::ArrayRef< AvailabilitySpec > AvailSpecs, SourceLocation AtLoc, SourceLocation RParen)
void CodeCompleteNamespaceAliasDecl(Scope *S)
QualType FindCompositePointerType(SourceLocation Loc, Expr *&E1, Expr *&E2, bool ConvertArgs=true)
Find a merged pointer type and convert the two expressions to it.
static SourceRange getPrintable(SourceRange R)
OMPClause * ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangl...
bool AttachBaseSpecifiers(CXXRecordDecl *Class, MutableArrayRef< CXXBaseSpecifier * > Bases)
Performs the actual work of attaching the given base class specifiers to a C++ class.
ExprResult BuildCXXTypeConstructExpr(TypeSourceInfo *Type, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc, bool ListInitialization)
@ CTAK_Specified
The template argument was specified in the code or was instantiated with some deduced template argume...
@ ExceptionSpecInstantiation
We are instantiating the exception specification for a function template which was deferred until it ...
void computeNRVO(Stmt *Body, sema::FunctionScopeInfo *Scope)
Given the set of return statements within a function body, compute the variables that are subject to ...
void enterFunctionArgument(SourceLocation Tok, llvm::function_ref< QualType()> ComputeType)
Computing a type for the function argument may require running overloading, so we postpone its comput...
ExprResult BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, TypeSourceInfo *Ty, Expr *E, SourceRange AngleBrackets, SourceRange Parens)
SYCLIntelFPGAIVDepAttr * BuildSYCLIntelFPGAIVDepAttr(const AttributeCommonInfo &CI, Expr *Expr1, Expr *Expr2)
OverloadKind CheckOverload(Scope *S, FunctionDecl *New, const LookupResult &OldDecls, NamedDecl *&OldDecl, bool IsForUsingDecl)
Determine whether the given New declaration is an overload of the declarations in Old.
OMPClause * ActOnOpenMPCompareClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'compare' clause.
void * SaveNestedNameSpecifierAnnotation(CXXScopeSpec &SS)
Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to recon...
Describes a module or submodule.
StmtResult ActOnGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc, LabelDecl *TheDecl)
OMPDeclareTargetDeclAttr::MapTypeTy MT
bool CheckOpenMPLinearModifier(OpenMPLinearClauseKind LinKind, SourceLocation LinLoc)
Checks correctness of linear modifiers.
ExprResult ActOnNameClassifiedAsUndeclaredNonType(IdentifierInfo *Name, SourceLocation NameLoc)
Act on the result of classifying a name as an undeclared (ADL-only) non-type declaration.
void CodeCompleteFunctionQualifiers(DeclSpec &DS, Declarator &D, const VirtSpecifiers *VS=nullptr)
bool inTemplateInstantiation() const
Determine whether we are currently performing template instantiation.
void ActOnCapturedRegionError()
SpecialMemberOverloadResult()
FileNullability & operator[](FileID file)
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
void enterVariableInit(SourceLocation Tok, Decl *D)
OMPClause * ActOnOpenMPPartialClause(Expr *FactorExpr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-form 'partial' clauses.
FullExprArg MakeFullExpr(Expr *Arg, SourceLocation CC)
ExprResult ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc)
@ KernelCallRecursiveFunction
@ UPPC_Block
Block expression.
OMPClause * ActOnOpenMPScheduleClause(OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
Called on well-formed 'schedule' clause.
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
void EmitRelatedResultTypeNoteForReturn(QualType destType)
Given that we had incompatible pointer types in a return statement, check whether we're in a method w...
void CheckVirtualDtorCall(CXXDestructorDecl *dtor, SourceLocation Loc, bool IsDelete, bool CallCanBeVirtual, bool WarnOnNonAbstractTypes, SourceLocation DtorLoc)
bool isInstantiationRecord() const
Determines whether this template is an actual instantiation that should be counted toward the maximum...
StmtResult ActOnOpenMPTeamsDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute' after parsing of the associated statement.
void ActOnTagFinishDefinition(Scope *S, Decl *TagDecl, SourceRange BraceRange)
ActOnTagFinishDefinition - Invoked once we have finished parsing the definition of a tag (enumeration...
Represents the body of a requires-expression.
void CodeCompleteQualifiedId(Scope *S, CXXScopeSpec &SS, bool EnteringContext, bool IsUsingDeclaration, QualType BaseType, QualType PreferredType)
std::pair< SourceLocation, PartialDiagnostic > PartialDiagnosticAt
A partial diagnostic along with the source location where this diagnostic occurs.
TentativeDefinitionsType TentativeDefinitions
All the tentative definitions encountered in the TU.
DiagnosticsEngine & getDiagnostics() const
void ActOnStartSEHFinallyBlock()
@ UPPC_Initializer
An initializer.
void CodeCompletePreprocessorDirective(bool InConditional)
A convenient class for passing around template argument information.
NamespaceDecl * CoroTraitsNamespaceCache
The namespace where coroutine components are defined.
void MarkAnyDeclReferenced(SourceLocation Loc, Decl *D, bool MightBeOdrUse)
Perform marking for a reference to an arbitrary declaration.
RAII object used to change the argument pack substitution index within a Sema object.
void MaybeAddCUDAConstantAttr(VarDecl *VD)
May add implicit CUDAConstantAttr attribute to VD, depending on VD and current compilation settings.
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
ExprResult ActOnObjCBridgedCast(Scope *S, SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, ParsedType Type, SourceLocation RParenLoc, Expr *SubExpr)
void ActOnCaseStmtBody(Stmt *CaseStmt, Stmt *SubStmt)
ActOnCaseStmtBody - This installs a statement as the body of a case.
TypeResult ActOnTypeName(Scope *S, Declarator &D)
FPOptionsOverride CurFPFeatureOverrides()
CXXMethodDecl * startLambdaDefinition(CXXRecordDecl *Class, SourceRange IntroducerRange, TypeSourceInfo *MethodType, SourceLocation EndLoc, ArrayRef< ParmVarDecl * > Params, ConstexprSpecKind ConstexprKind, Expr *TrailingRequiresClause)
Start the definition of a lambda expression.
llvm::SmallDenseMap< const ValueDecl *, const Expr *, 4 > VarsWithInheritedDSAType
RAII class to control scope of DeferDiags.
ExprResult ActOnPseudoDestructorExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName)
TagTypeKind
The kind of a tag type.
StmtResult ActOnOpenMPDepobjDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp depobj'.
@ PCC_Class
Code completion occurs within a class, struct, or union.
void diagnoseARCUnbridgedCast(Expr *e)
Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly.
bool CheckMatrixCast(SourceRange R, QualType DestTy, QualType SrcTy, CastKind &Kind)
OMPClause * ActOnOpenMPPriorityClause(Expr *Priority, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'priority' clause.
DeclResult ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody=nullptr)
ExprResult ActOnChooseExpr(SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc)
void ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS)
ActOnCXXExitDeclaratorScope - Called when a declarator that previously invoked ActOnCXXEnterDeclarato...
OMPClause * ActOnOpenMPInitClause(Expr *InteropVar, ArrayRef< Expr * > PrefExprs, bool IsTarget, bool IsTargetSync, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'init' clause.
LazyVector< const DeclaratorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 > UnusedFileScopedDeclsType
Represents a block literal declaration, which is like an unnamed FunctionDecl.
std::pair< llvm::PointerUnion< const TemplateTypeParmType *, NamedDecl * >, SourceLocation > UnexpandedParameterPack
Decl * BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy)
BuildAnonymousStructOrUnion - Handle the declaration of an anonymous structure or union.
ExprResult ActOnCUDAExecConfigExpr(Scope *S, SourceLocation LLLLoc, MultiExprArg ExecConfig, SourceLocation GGGLoc)
void UpdateExceptionSpec(FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI)
OMPClause * ActOnOpenMPToClause(ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers=llvm::None)
Called on well-formed 'to' clause.
LangAS getAddressSpace() const
Return the address space of this type.
QualType get(SourceLocation Tok) const
Get the expected type associated with this location, if any.
void MergeVarDecl(VarDecl *New, LookupResult &Previous)
MergeVarDecl - We just parsed a variable 'New' which has the same name and scope as a previous declar...
void EmitRelatedResultTypeNote(const Expr *E)
If the given expression involves a message send to a method with a related result type,...
AccessResult CheckMemberAccess(SourceLocation UseLoc, CXXRecordDecl *NamingClass, DeclAccessPair Found)
Checks access to a member.
void ActOnLastBitfield(SourceLocation DeclStart, SmallVectorImpl< Decl * > &AllIvarDecls)
ActOnLastBitfield - This routine handles synthesized bitfields rules for class and class extensions.
ExprResult ActOnDesignatedInitializer(Designation &Desig, SourceLocation EqualOrColonLoc, bool GNUSyntax, ExprResult Init)
void diagnoseUnavailableAlignedAllocation(const FunctionDecl &FD, SourceLocation Loc)
Produce diagnostics if FD is an aligned allocation or deallocation function that is unavailable.
@ Ref_Incompatible
Ref_Incompatible - The two types are incompatible, so direct reference binding is not possible.
ObjCPropertyDecl * CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
Called by ActOnProperty and HandlePropertyInClassExtension to handle creating the ObjcPropertyDecl fo...
ExceptionSpecificationType
The various types of exception specifications that exist in C++11.
bool CheckPureMethod(CXXMethodDecl *Method, SourceRange InitRange)
Mark the given method pure.
void ActOnFinishDelayedMemberInitializers(Decl *Record)
ExprResult ActOnBuiltinOffsetOf(Scope *S, SourceLocation BuiltinLoc, SourceLocation TypeLoc, ParsedType ParsedArgTy, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc)
@ ACK_BitwiseOp
A bitwise operation.
static CanThrowResult canCalleeThrow(Sema &S, const Expr *E, const Decl *D, SourceLocation Loc=SourceLocation())
Determine whether the callee of a particular function call can throw.
void AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl)
AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions,...
ExprResult HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super)
HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface.
bool RequireCompleteType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
void ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace)
ActOnFinishNamespaceDef - This callback is called after a namespace is exited.
This is a basic class for representing single OpenMP clause.
StmtResult ActOnOpenMPMasterTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp master taskloop' after parsing of the associated statement.
void Clear() const
Clear out the current diagnostic.
bool CheckObjCBridgeRelatedConversions(SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose=true)
void InstantiateExceptionSpec(SourceLocation PointOfInstantiation, FunctionDecl *Function)
ParsedType CreateParsedType(QualType T, TypeSourceInfo *TInfo)
Package the given type and TSI into a ParsedType.
void CheckObjCBridgeRelatedCast(QualType castType, Expr *castExpr)
void ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc)
ActOnPragmaOptionsAlign - Called on well formed #pragma options align.
Holds information about the various types of exception specification.
bool hasUncompilableErrorOccurred() const
Whether uncompilable error has occurred.
void CodeCompleteObjCAtVisibility(Scope *S)
bool CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams)
Check whether a template can be declared within this scope.
void CodeCompleteObjCMethodDecl(Scope *S, Optional< bool > IsInstanceMethod, ParsedType ReturnType)
ClassTemplateDecl * lookupCoroutineTraits(SourceLocation KwLoc, SourceLocation FuncLoc, NamespaceDecl *&Namespace)
Lookup 'coroutine_traits' in std namespace and std::experimental namespace.
void CheckVirtualSYCLAddIRAttributesFunctionAttr(const NamedDecl *D)
CheckVirtualSYCLAddIRAttributesFunctionAttr - Check and diagnose if a SYCLAddIRAttributesFunctionAttr...
void DiagnoseEmptyLoopBody(const Stmt *S, const Stmt *PossibleBody)
Warn if a for/while loop statement S, which is followed by PossibleBody, has a suspicious null statem...
ActionResult< CXXCtorInitializer * > MemInitResult
Declaration of a C++2a concept.
bool MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S)
MergeCXXFunctionDecl - Merge two declarations of the same C++ function, once we already know that the...
UnexpandedParameterPackContext
The context in which an unexpanded parameter pack is being diagnosed.
StmtResult ActOnCXXForRangeStmt(Scope *S, SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, Stmt *LoopVar, SourceLocation ColonLoc, Expr *Collection, SourceLocation RParenLoc, BuildForRangeKind Kind)
ActOnCXXForRangeStmt - Check and build a C++11 for-range statement.
Scope - A scope is a transient data structure that is used while parsing the program.
virtual SemaDiagnosticBuilder noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy)=0
Emits a note for the explicit conversion function.
bool IsAtLeastAsConstrained(NamedDecl *D1, ArrayRef< const Expr * > AC1, NamedDecl *D2, ArrayRef< const Expr * > AC2, bool &Result)
Check whether the given declaration's associated constraints are at least as constrained than another...
void EnterDeclaratorContext(Scope *S, DeclContext *DC)
EnterDeclaratorContext - Used when we must lookup names in the context of a declarator's nested name ...
llvm::SmallPtrSet< const NamedDecl *, 4 > TypoCorrectedFunctionDefinitions
The function definitions which were renamed as part of typo-correction to match their respective decl...
bool isComparison() const
bool match(QualType T) override
Match an integral or (possibly scoped) enumeration type.
CanThrowResult
Possible results from evaluation of a noexcept expression.
CXXConstructorDecl * LookupCopyingConstructor(CXXRecordDecl *Class, unsigned Quals)
Look up the copying constructor for the given class.
void AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
AddAlignValueAttr - Adds an align_value attribute to a particular declaration.
@ K_Nop
Emit no diagnostics.
OpenMPDefaultmapClauseKind
OpenMP attributes for 'defaultmap' clause.
ExprResult BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg, QualType ParamType, SourceLocation Loc)
Given a non-type template argument that refers to a declaration and the type of its corresponding non...
void CheckCategoryVsClassMethodMatches(ObjCCategoryImplDecl *CatIMP)
CheckCategoryVsClassMethodMatches - Checks that methods implemented in category matches with those im...
bool CheckMemberSpecialization(NamedDecl *Member, LookupResult &Previous)
Perform semantic analysis for the given non-template member specialization.
ObjCMethodDecl * tryCaptureObjCSelf(SourceLocation Loc)
Try to capture an implicit reference to 'self'.
MaybeODRUseExprSet SavedMaybeODRUseExprs
ClassTemplateDecl * StdInitializerList
The C++ "std::initializer_list" template, which is defined in <initializer_list>.
void enterUnary(Sema &S, SourceLocation Tok, tok::TokenKind OpKind, SourceLocation OpLoc)
void MarkThisReferenced(CXXThisExpr *This)
bool RequireNonAbstractType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
@ TemplateInstantiation
We are instantiating a template declaration.
bool IsSimplyAccessible(NamedDecl *Decl, CXXRecordDecl *NamingClass, QualType BaseType)
Checks access to Target from the given class.
ExprResult ActOnCXXFoldExpr(Scope *S, SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
Handle a C++1z fold-expression: ( expr op ... op expr ).
ExprResult CheckObjCForCollectionOperand(SourceLocation forLoc, Expr *collection)
QualType CheckComparisonCategoryType(ComparisonCategoryType Kind, SourceLocation Loc, ComparisonCategoryUsage Usage)
Lookup the specified comparison category types in the standard library, an check the VarDecls possibl...
std::deque< PendingImplicitInstantiation > PendingLocalImplicitInstantiations
The queue of implicit template instantiations that are required and must be performed within the curr...
void * VisContext
VisContext - Manages the stack for #pragma GCC visibility.
A POD class for pairing a NamedDecl* with an access specifier.
Represents a GCC generic vector type.
IdentifierInfo * getNullabilityKeyword(NullabilityKind nullability)
Retrieve the keyword associated.
ExprResult ActOnSYCLBuiltinNumBasesExpr(ParsedType PT)
Get the number of base classes within the parsed type.
@ K_Immediate
Emit the diagnostic immediately (i.e., behave like Sema::Diag()).
@ CTAK_Deduced
The template argument was deduced via template argument deduction.
Decl * ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth)
ActOnField - Each field of a C struct/union is passed into this in order to create a FieldDecl object...
void PushDeclContext(Scope *S, DeclContext *DC)
Set the current declaration context until it gets popped.
ExprResult DefaultFunctionArrayConversion(Expr *E, bool Diagnose=true)
DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
@ RequirementInstantiation
We are instantiating a requirement of a requires expression.
Represents difference between two FPOptions values.
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
StmtResult ActOnOpenMPTargetTeamsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target teams' after parsing of the associated statement.
LateTemplateParserCB * LateTemplateParser
bool AccessCheckingSFINAE
When true, access checking violations are treated as SFINAE failures rather than hard errors.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
FPExceptionModeKind
Possible floating point exception behavior.
ParsedType getInheritingConstructorName(CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo &Name)
Handle the result of the special case name lookup for inheriting constructor declarations.
llvm::SmallPtrSet< Selector, 8 > SelectorSet
FunctionDecl * resolveAddressOfSingleOverloadCandidate(Expr *E, DeclAccessPair &FoundResult)
Given an expression that refers to an overloaded function, try to resolve that function to a single f...
MutableArrayRef< TemplateParameterList * > MultiTemplateParamsArg
Decl * ActOnSkippedFunctionBody(Decl *Decl)
void FinalizeDeclaration(Decl *D)
FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions neces...
ActionResult< Expr * > ExprResult
bool canFullyTypeCheckRedeclaration(ValueDecl *NewD, ValueDecl *OldD, QualType NewT, QualType OldT)
Determines if we can perform a correct type check for D as a redeclaration of PrevDecl.
void RefersToMemberWithReducedAlignment(Expr *E, llvm::function_ref< void(Expr *, RecordDecl *, FieldDecl *, CharUnits)> Action)
This function calls Action when it determines that E designates a misaligned member due to the packed...
@ Diagnose
Diagnose issues that are non-constant or that are extensions.
bool hasVisibleDefinition(const NamedDecl *D)
@ PartitionInterface
'export module X:Y;'
void InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
bool CheckForConstantInitializer(Expr *e, QualType t)
type checking declaration initializers (C99 6.7.8)
void addMethodToGlobalList(ObjCMethodList *List, ObjCMethodDecl *Method)
Add the given method to the list of globally-known methods.
Represents an array type, per C99 6.7.5.2 - Array Declarators.
void warnOnReservedIdentifier(const NamedDecl *D)
AccessResult CheckConstructorAccess(SourceLocation Loc, CXXConstructorDecl *D, DeclAccessPair FoundDecl, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp=false)
Checks access to a constructor.
NamedDecl * getCurFunctionOrMethodDecl()
getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method or C function we're in,...
OMPClause * ActOnOpenMPReductionClause(ArrayRef< Expr * > VarList, OpenMPReductionClauseModifier Modifier, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=llvm::None)
Called on well-formed 'reduction' clause.
StmtResult ActOnExprStmt(ExprResult Arg, bool DiscardedValue=true)
void ActOnBaseSpecifiers(Decl *ClassDecl, MutableArrayRef< CXXBaseSpecifier * > Bases)
ActOnBaseSpecifiers - Attach the given base specifiers to the class, after checking whether there are...
QualType BuildQualifiedType(QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS=nullptr)
ExprResult ActOnOpenMPDeclareMapperDirectiveVarDecl(Scope *S, QualType MapperType, SourceLocation StartLoc, DeclarationName VN)
Build the mapper variable of '#pragma omp declare mapper'.
bool GlobalNewDeleteDeclared
A flag to remember whether the implicit forms of operator new and delete have been declared.
QualType getLambdaConversionFunctionResultType(const FunctionProtoType *CallOpType, CallingConv CC)
Get the return type to use for a lambda's conversion function(s) to function pointer type,...
GlobalEagerInstantiationScope(Sema &S, bool Enabled)
void CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **Fields, unsigned nIvars, SourceLocation Loc)
CheckImplementationIvars - This routine checks if the instance variables listed in the implelementati...
QualType NSValuePointer
Pointer to NSValue type (NSValue *).
bool DeduceVariableDeclarationType(VarDecl *VDecl, bool DirectInit, Expr *Init)
@ PCC_RecoveryInFunction
Code completion occurs within the body of a function on a recovery path, where we do not have a speci...
void AddAnnotationAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Annot, MutableArrayRef< Expr * > Args)
AddAnnotationAttr - Adds an annotation Annot with Args arguments to D.
PragmaStackSentinelRAII(Sema &S, StringRef SlotLabel, bool ShouldAct)
OptimizeNoneAttr * mergeOptimizeNoneAttr(Decl *D, const AttributeCommonInfo &CI)
bool hasAnyAcceptableTemplateNames(LookupResult &R, bool AllowFunctionTemplates=true, bool AllowDependent=true, bool AllowNonTemplateFunctions=false)
ExprResult BuildSynthesizedThreeWayComparison(SourceLocation OpLoc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, FunctionDecl *DefaultedFn)
void ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, SmallVectorImpl< FunctionDecl * > &Bases)
The declarator D defines a function in the scope S which is nested in an omp begin/end declare varian...
OpaquePtr< TemplateName > TemplateTy
unsigned NumTypos
The number of typos encountered during this expression evaluation context (i.e.
Decl * ActOnMethodDeclaration(Scope *S, SourceLocation BeginLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef< SourceLocation > SelectorLocs, Selector Sel, ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo, unsigned CNumArgs, const ParsedAttributesView &AttrList, tok::ObjCKeywordKind MethodImplKind, bool isVariadic, bool MethodDefinition)
@ IER_DoesNotExist
The symbol does not exist.
A decomposition declaration.
FPEvalMethodKind
Possible float expression evaluation method choices.
OMPClause * ActOnOpenMPReverseOffloadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'reverse_offload' clause.
@ PointerToInt
PointerToInt - The assignment converts a pointer to an int, which we accept as an extension.
Captures information about a #pragma weak directive.
LiteralOperatorLookupResult
The possible outcomes of name lookup for a literal operator.
ExprResult BuildResolvedCoawaitExpr(SourceLocation KwLoc, Expr *E, bool IsImplicit=false)
enum clang::Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext
TypeVisibilityAttr * mergeTypeVisibilityAttr(Decl *D, const AttributeCommonInfo &CI, TypeVisibilityAttr::VisibilityType Vis)
A requires-expression requirement which is satisfied when a general constraint expression is satisfie...
NamedDecl * ActOnNonTypeTemplateParameter(Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *DefaultArg)
~ArgumentPackSubstitutionIndexRAII()
Stores the type being destroyed by a pseudo-destructor expression.
A set of visible modules.
bool hasErrorOccurred() const
Determine whether any SFINAE errors have been trapped.
ExprResult BuildInstanceMessageImplicit(Expr *Receiver, QualType ReceiverType, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
void ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *Alignment)
ActOnPragmaPack - Called on well formed #pragma pack(...).
void FindHiddenVirtualMethods(CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
Check if a method overloads virtual methods in a base class without overriding any.
llvm::SmallPtrSet< const Expr *, 8 > PossibleDerefs
OpenMPOrderClauseKind
OpenMP attributes for 'order' clause.
void CodeCompleteAttribute(AttributeCommonInfo::Syntax Syntax, AttributeCompletion Completion=AttributeCompletion::Attribute, const IdentifierInfo *Scope=nullptr)
void popUndelayed(DelayedDiagnosticsState state)
Undo a previous pushUndelayed().
ExprResult getExpression() const
void CodeCompleteObjCImplementationDecl(Scope *S)
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.
NamedDecl * FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS)
If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup ...
bool isUnavailableAlignedAllocationFunction(const FunctionDecl &FD) const
Determine whether FD is an aligned allocation or deallocation function that is unavailable.
void Initialize()
Perform initialization that occurs after the parser has been initialized but before it parses anythin...
void DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, const WeakInfo &W)
@ Esimd
ESIMD specific diagnostic.
concepts::Requirement * ActOnTypeRequirement(SourceLocation TypenameKWLoc, CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo *TypeName, TemplateIdAnnotation *TemplateId)
@ Unevaluated
The current expression and its subexpressions occur within an unevaluated operand (C++11 [expr]p7),...
static const uint64_t MaximumAlignment
bool SubstTemplateArguments(ArrayRef< TemplateArgumentLoc > Args, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateArgumentListInfo &Outputs)
ExprResult PerformQualificationConversion(Expr *E, QualType Ty, ExprValueKind VK=VK_PRValue, CheckedConversionKind CCK=CCK_ImplicitConversion)
Represents a template argument.
StmtResult ActOnOpenMPCancellationPointDirective(SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Called on well-formed '#pragma omp cancellation point'.
StmtResult ActOnOpenMPTargetParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel for simd' after parsing of the associated statemen...
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
void CodeCompleteExpression(Scope *S, const CodeCompleteExpressionData &Data)
Perform code-completion in an expression context when we know what type we're looking for.
bool DiagnoseUnexpandedParameterPack(SourceLocation Loc, TypeSourceInfo *T, UnexpandedParameterPackContext UPPC)
If the given type contains an unexpanded parameter pack, diagnose the error.
QualType BuildWritePipeType(QualType T, SourceLocation Loc)
Build a Write-only Pipe type.
A static requirement that can be used in a requires-expression to check properties of types and expre...
@ CCEK_Noexcept
Condition in a noexcept(bool) specifier.
ParsedType ObjectType
The type of the object, if we're parsing nested-name-specifier in a member access expression.
bool ShouldSplatAltivecScalarInCast(const VectorType *VecTy)
SmallVector< CXXBindTemporaryExpr *, 8 > DelayedDecltypeBinds
If we are processing a decltype type, a set of temporary binding expressions for which we have deferr...
void ActOnStartOfObjCMethodDef(Scope *S, Decl *D)
ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared,...
AssignConvertType
AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the ...
Data structure that captures multiple levels of template argument lists for use in template instantia...
VarDecl * BuildObjCExceptionDecl(TypeSourceInfo *TInfo, QualType ExceptionType, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid=false)
Build a type-check a new Objective-C exception variable declaration.
@ DeducedTemplateArgumentSubstitution
We are substituting template argument determined as part of template argument deduction for either a ...
bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
@ None
This is not a defaultable comparison operator.
void AddInitializerToDecl(Decl *dcl, Expr *init, bool DirectInit)
AddInitializerToDecl - Adds the initializer Init to the declaration dcl.
ExprResult PerformContextuallyConvertToBool(Expr *From)
PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C+...
bool CheckSpecifiedExceptionType(QualType &T, SourceRange Range)
CheckSpecifiedExceptionType - Check if the given type is valid in an exception specification.
@ Ovl_Match
This is not an overload because the signature exactly matches an existing declaration.
DiagnosticsEngine & Diags
An abstract interface that should be implemented by external AST sources that also provide informatio...
NameClassification ClassifyName(Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken, CorrectionCandidateCallback *CCC=nullptr)
Perform name lookup on the given name, classifying it based on the results of name lookup and the fol...
SemaDiagnosticBuilder diagIfOpenMPHostCode(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as host cod...
void LateTemplateParserCB(void *P, LateParsedTemplate &LPT)
Callback to the parser to parse templated functions when needed.
bool CanPerformCopyInitialization(const InitializedEntity &Entity, ExprResult Init)
bool DiagRuntimeBehavior(SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD)
Conditionally issue a diagnostic based on the current evaluation context.
std::function< ExprResult(Sema &, TypoExpr *, TypoCorrection)> TypoRecoveryCallback
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
void PushBlockScope(Scope *BlockScope, BlockDecl *Block)
Represents the declaration of a label.
QualType getDecltypeForExpr(Expr *E)
getDecltypeForExpr - Given an expr, will return the decltype for that expression, according to the ru...
static ConditionResult ConditionError()
void CheckCompleteDestructorVariant(SourceLocation CurrentLocation, CXXDestructorDecl *Dtor)
Do semantic checks to allow the complete destructor variant to be emitted when the destructor is defi...
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
@ TPC_ClassTemplateMember
void AddLaunchBoundsAttr(Decl *D, const AttributeCommonInfo &CI, Expr *MaxThreads, Expr *MinBlocks)
AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular declaration.
void ActOnBlockStart(SourceLocation CaretLoc, Scope *CurScope)
ActOnBlockStart - This callback is invoked when a block literal is started.
bool ProcessAccessDeclAttributeList(AccessSpecDecl *ASDecl, const ParsedAttributesView &AttrList)
QualType BuildMemberPointerType(QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity)
Build a member pointer type T Class::*.
StmtResult ActOnOpenMPTargetTeamsDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute simd' after parsing of the associated stat...
@ AMK_None
Don't merge availability attributes at all.
virtual SemaDiagnosticBuilder diagnoseNotICEType(Sema &S, SourceLocation Loc, QualType T)
ReqdWorkGroupSizeAttr * MergeReqdWorkGroupSizeAttr(Decl *D, const ReqdWorkGroupSizeAttr &A)
ExprResult BuildCXXTypeId(QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
Build a C++ typeid expression with a type operand.
ComparisonCategoryType
An enumeration representing the different comparison categories types.
@ ACK_Arithmetic
An arithmetic operation.
bool tryCaptureVariable(VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt)
Try to capture the given variable.
@ LookupObjCProtocolName
Look up the name of an Objective-C protocol.
StmtResult ActOnOpenMPDispatchDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp dispatch' after parsing of the.
@ GlobalFragment
after 'module;' but before 'module X;'
void ActOnPragmaFPContract(SourceLocation Loc, LangOptions::FPModeKind FPC)
ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT and #pragma clang fp ...
bool CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM)
@ Implementation
'module X;'
bool areLaxCompatibleVectorTypes(QualType srcType, QualType destType)
Are the two types lax-compatible vector types? That is, given that one of them is a vector,...
void checkVariadicArgument(const Expr *E, VariadicCallType CT)
Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic...
void DiagnoseNontrivial(const CXXRecordDecl *Record, CXXSpecialMember CSM)
Diagnose why the specified class does not have a trivial special member of the given kind.
Consumes visible declarations found when searching for all visible names within a given scope or cont...
OMPClause * ActOnOpenMPReadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'read' clause.
PartialDiagnostic PDiag(unsigned DiagID=0)
Build a partial diagnostic.
OMPClause * ActOnOpenMPFromClause(ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers=llvm::None)
Called on well-formed 'from' clause.
Abstract base class used to perform a contextual implicit conversion from an expression to any type p...
@ IncompatibleFunctionPointer
IncompatibleFunctionPointer - The assignment is between two function pointers types that are not comp...
@ BFRK_Check
Determining whether a for-range statement could be built.
bool hasVisibleDefaultArgument(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if the template parameter D has a visible default argument.
bool ActOnCoroutineBodyStart(Scope *S, SourceLocation KwLoc, StringRef Keyword)
@ TNK_Var_template
The name refers to a variable template whose specialization produces a variable.
Represents a C++ destructor within a class.
QualType CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc)
Note that LHS is not null here, even if this is the gnu "x ?: y" extension.
static QualType GetTypeFromParser(ParsedType Ty, TypeSourceInfo **TInfo=nullptr)
bool isInvalid() const
Determines whether we have exceeded the maximum recursive template instantiations.
@ None
This is not assumed to be a template name.
sema::LambdaScopeInfo * getCurLambda(bool IgnoreNonLambdaCapturingScope=false)
Retrieve the current lambda scope info, if any.
TypeTagData(QualType Type, bool LayoutCompatible, bool MustBeNull)
ExprResult BuildCStyleCastExpr(SourceLocation LParenLoc, TypeSourceInfo *Ty, SourceLocation RParenLoc, Expr *Op)
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
llvm::SmallVector< TypoExpr *, 2 > TypoExprs
Holds TypoExprs that are created from createDelayedTypo.
StmtResult ActOnOpenMPTargetTeamsDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute' after parsing of the associated statement...
@ NC_DependentNonType
The name denotes a member of a dependent type that could not be resolved.
QualType SubstAutoType(QualType TypeWithAuto, QualType Replacement)
Substitute Replacement for auto in TypeWithAuto.
void maybeAddCUDAHostDeviceAttrs(FunctionDecl *FD, const LookupResult &Previous)
May add implicit CUDAHostAttr and CUDADeviceAttr attributes to FD, depending on FD and the current co...
ExprResult ActOnDependentMemberExpr(Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
Location wrapper for a TemplateArgument.
static const std::string & getPrintable(const std::string &S)
ParsedAttr - Represents a syntactic attribute.
void CodeCompleteInitializer(Scope *S, Decl *D)
void InstantiateClassTemplateSpecializationMembers(SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK)
Instantiate the definitions of all of the members of the given class template specialization,...
llvm::omp::Clause OpenMPClauseKind
OpenMP clauses.
@ KernelCallFunctionPointer
bool isSizelessType() const
As an extension, we classify types as one of "sized" or "sizeless"; every type is one or the other.
bool IsLastErrorImmediate
Is the last error level diagnostic immediate.
StmtResult ActOnOpenMPAtomicDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp atomic' after parsing of the associated statement.
bool CheckCXXThisCapture(SourceLocation Loc, bool Explicit=false, bool BuildAndDiagnose=true, const unsigned *const FunctionScopeIndexToStopAt=nullptr, bool ByCopy=false)
Make sure the value of 'this' is actually available in the current context, if it is a potentially ev...
@ IncompatibleNestedPointerAddressSpaceMismatch
IncompatibleNestedPointerAddressSpaceMismatch - The assignment changes address spaces in nested point...
TemplateSpecCandidateSet - A set of generalized overload candidates, used in template specializations...
Decl * ActOnAliasDeclaration(Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec)
ExpressionEvaluationContext Context
The expression evaluation context.
bool ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI=nullptr, bool Diagnose=false)
Determine if a special member function should have a deleted definition when it is defaulted.
StmtResult ActOnOpenMPUnrollDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp unroll' after parsing of its clauses and the associated statement.
void CodeCompleteOrdinaryName(Scope *S, ParserCompletionContext CompletionContext)
NamedDecl * getNonTypeDecl() const
A context in which code is being synthesized (where a source location alone is not sufficient to iden...
@ Ovl_Overload
This is a legitimate overload: the existing declarations are functions or function templates with dif...
StmtResult ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope)
void ActOnModuleInclude(SourceLocation DirectiveLoc, Module *Mod)
The parser has processed a module import translated from a include or similar preprocessing directive...
bool MergeFunctionDecl(FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld)
MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and sco...
DeduceAutoResult
Result type of DeduceAutoType.
static bool TooManyArguments(size_t NumParams, size_t NumArgs, bool PartialOverloading=false)
To be used for checking whether the arguments being passed to function exceeds the number of paramete...
ExprResult ActOnObjCAtSynchronizedOperand(SourceLocation atLoc, Expr *operand)
StmtResult ActOnOpenMPTeamsDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute parallel for' after parsing of the associated sta...
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
void ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AL, bool IncludeCXX11Attributes=true)
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
StmtResult ActOnNullStmt(SourceLocation SemiLoc, bool HasLeadingEmptyMacro=false)
void addContextNote(SourceLocation UseLoc)
void CheckConflictingOverridingMethod(ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl)
@ FoundNothing
This is assumed to be a template name because lookup found nothing.
ExprResult ActOnVAArg(SourceLocation BuiltinLoc, Expr *E, ParsedType Ty, SourceLocation RPLoc)
This structure contains most locations needed for by an OMPVarListClause.
OMPClause * ActOnOpenMPUpdateClause(OpenMPDependClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'update' clause.
QualType ActOnOpenMPDeclareMapperType(SourceLocation TyLoc, TypeResult ParsedType)
Check if the specified type is allowed to be used in 'omp declare mapper' construct.
DefaultedFunctionKind getDefaultedFunctionKind(const FunctionDecl *FD)
Determine the kind of defaulting that would be done for a given function.
OverloadCandidateRewriteKind
The kinds of rewrite we perform on overload candidates.
DeclarationNameInfo GetNameForDeclarator(Declarator &D)
GetNameForDeclarator - Determine the full declaration name for the given Declarator.
@ TDK_DeducedMismatchNested
After substituting deduced template arguments, an element of a dependent parameter type did not match...
bool IsFunctionConversion(QualType FromType, QualType ToType, QualType &ResultTy)
Determine whether the conversion from FromType to ToType is a valid conversion that strips "noexcept"...
ReferenceCompareResult
ReferenceCompareResult - Expresses the result of comparing two types (cv1 T1 and cv2 T2) to determine...
@ KernelNonConstStaticDataVariable
StmtResult BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind)
BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.
ExprResult SubstExpr(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs)
bool IsAllowedCUDACall(const FunctionDecl *Caller, const FunctionDecl *Callee)
Determines whether Caller may invoke Callee, based on their CUDA host/device attributes.
ExprResult PerformContextualImplicitConversion(SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter)
Perform a contextual implicit conversion.
bool checkMSInheritanceAttrOnDefinition(CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceModel SemanticSpelling)
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Decl * ActOnUsingEnumDeclaration(Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, const DeclSpec &)
StmtResult ActOnOpenMPParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement.
PragmaClangSection PragmaClangTextSection
Represents a variable declaration or definition.
bool InstantiateDefaultArgument(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
void enterCondition(Sema &S, SourceLocation Tok)
bool DeduceReturnType(FunctionDecl *FD, SourceLocation Loc, bool Diagnose=true)
void ActOnPragmaRedefineExtname(IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
ActOnPragmaRedefineExtname - Called on well formed #pragma redefine_extname oldname newname.
std::pair< StringRef, QualType > CapturedParamNameType
@ NestedRequirementConstraintsCheck
We are checking the satisfaction of a nested requirement of a requires expression.
OMPClause * ActOnOpenMPAllocatorClause(Expr *Allocator, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'allocator' clause.
IdentifierInfo * Identifier
The identifier preceding the '::'.
@ LookupDestructorName
Look up a name following ~ in a destructor name.
Represents the declaration of a struct/union/class/enum.
ArithConvKind
Context in which we're performing a usual arithmetic conversion.
ParserCompletionContext
Describes the context in which code completion occurs.
NamedDecl * ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II, Scope *S)
ImplicitlyDefineFunction - An undeclared identifier was used in a function call, forming a call to an...
static unsigned getPrintable(unsigned I)
unsigned getHashValue() const
ExprResult DefaultFunctionArrayLvalueConversion(Expr *E, bool Diagnose=true)
Decl * ActOnStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc)
void deepTypeCheckForSYCLDevice(SourceLocation UsedAt, llvm::DenseSet< QualType > Visited, ValueDecl *DeclToCheck)
bool operator==(const AlignPackInfo &Info) const
void diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName, SourceLocation Less, SourceLocation Greater)
static bool isCUDAImplicitHostDeviceFunction(const FunctionDecl *D)
CXXDestructorDecl * LookupDestructor(CXXRecordDecl *Class)
Look for the destructor of the given class.
Stores a list of template parameters for a TemplateDecl and its derived classes.
StringLiteral - This represents a string literal expression, e.g.
Decl * ActOnObjCExceptionDecl(Scope *S, Declarator &D)
DeclGroupPtrTy ActOnOpenMPThreadprivateDirective(SourceLocation Loc, ArrayRef< Expr * > VarList)
Called on well-formed '#pragma omp threadprivate'.
void MarkCaptureUsedInEnclosingContext(VarDecl *Capture, SourceLocation Loc, unsigned CapturingScopeIndex)
std::pair< ValueDecl *, SourceLocation > PendingImplicitInstantiation
An entity for which implicit template instantiation is required.
SmallVector< AlignPackIncludeState, 8 > AlignPackIncludeStack
OMPClause * ActOnOpenMPDynamicAllocatorsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'dynamic_allocators' clause.
ExprResult MaybeBindToTemporary(Expr *E)
MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor,...
OpenCLUnrollHintAttr * BuildOpenCLLoopUnrollHintAttr(const AttributeCommonInfo &A, Expr *E)
void DiagnoseAmbiguousLookup(LookupResult &Result)
Produce a diagnostic describing the ambiguity that resulted from name lookup.
ObjCTypeParamVariance
Describes the variance of a given generic parameter.
ExprResult ActOnCoyieldExpr(Scope *S, SourceLocation KwLoc, Expr *E)
CXXMethodDecl * getMethod() const
bool MaybeEmitAmbiguousAtomicConstraintsDiagnostic(NamedDecl *D1, ArrayRef< const Expr * > AC1, NamedDecl *D2, ArrayRef< const Expr * > AC2)
If D1 was not at least as constrained as D2, but would've been if a pair of atomic constraints involv...
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
bool isInOpenMPTaskUntiedContext() const
Return true if currently in OpenMP task with untied clause context.
union clang::Sema::OffsetOfComponent::@238 U
OMPClause * ActOnOpenMPDefaultClause(llvm::omp::DefaultKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'default' clause.
Represents a declaration of a type.
void CodeCompleteTypeQualifiers(DeclSpec &DS)
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
bool CheckRedeclarationInModule(NamedDecl *New, NamedDecl *Old)
Stmt * MaybeCreateStmtWithCleanups(Stmt *SubStmt)
ObjCKeywordKind
Provides a namespace for Objective-C keywords which start with an '@'.
StmtResult ActOnSEHExceptBlock(SourceLocation Loc, Expr *FilterExpr, Stmt *Block)
OMPClause * ActOnOpenMPFlushClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'flush' pseudo clause.
void WarnOnPendingNoDerefs(ExpressionEvaluationContextRecord &Rec)
Emit a warning for all pending noderef expressions that we recorded.
bool LookupParsedName(LookupResult &R, Scope *S, CXXScopeSpec *SS, bool AllowBuiltinCreation=false, bool EnteringContext=false)
Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope speci...
bool isSelfExpr(Expr *RExpr)
Private Helper predicate to check for 'self'.
ExprResult BuildObjCStringLiteral(SourceLocation AtLoc, StringLiteral *S)
void setOpenMPCaptureKind(FieldDecl *FD, const ValueDecl *D, unsigned Level)
Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.) for FD based on DSA for the...
ExprResult BuildClassMessageImplicit(QualType ReceiverType, bool isSuperReceiver, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
void AddIntelReqdSubGroupSize(Decl *D, const AttributeCommonInfo &CI, Expr *E)
ObjCMessageKind
Describes the kind of message expression indicated by a message send that starts with an identifier.
SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset=0)
Calls Lexer::getLocForEndOfToken()
void CodeCompleteMemberReferenceExpr(Scope *S, Expr *Base, Expr *OtherOpBase, SourceLocation OpLoc, bool IsArrow, bool IsBaseExprStatement, QualType PreferredType)
DeviceDiagnosticReason
Bitmask to contain the list of reasons a single diagnostic should be emitted, based on its language.
@ PCC_ForInit
Code completion occurs at the beginning of the initialization statement (or expression) in a for loop...
Decl * ActOnStartExportDecl(Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc)
We have parsed the start of an export declaration, including the '{' (if present).
void ActOnOpenMPDeclareTargetName(NamedDecl *ND, SourceLocation Loc, OMPDeclareTargetDeclAttr::MapTypeTy MT, DeclareTargetContextInfo &DTCI)
Called on correct id-expression from the '#pragma omp declare target'.
QualType BuildTypeofExprType(Expr *E)
TemplateDeductionResult DeduceTemplateArguments(ClassTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info)
Perform template argument deduction to determine whether the given template arguments match the given...
OpenCL supported extensions and optional core features.
DeclGroupPtrTy ActOnForwardClassDeclaration(SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef< ObjCTypeParamList * > TypeParamLists, unsigned NumElts)
FPOptions & getCurFPFeatures()
An instance of this object exists for each enum constant that is defined.
void checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D=nullptr)
Check if the type is allowed to be used for the current target.
@ TDK_NonDeducedMismatch
A non-depnedent component of the parameter did not match the corresponding component of the argument.
FunctionDecl * FindDeallocationFunctionForDestructor(SourceLocation StartLoc, CXXRecordDecl *RD)
~PragmaStackSentinelRAII()
ArrayRef< InventedTemplateParameterInfo > getInventedParameterInfos() const
ExprResult BuildBuiltinBitCastExpr(SourceLocation KWLoc, TypeSourceInfo *TSI, Expr *Operand, SourceLocation RParenLoc)
StmtResult ActOnOpenMPLoopnest(Stmt *AStmt)
Process a canonical OpenMP loop nest that can either be a canonical literal loop (ForStmt or CXXForRa...
IfExistsResult CheckMicrosoftIfExistsSymbol(Scope *S, CXXScopeSpec &SS, const DeclarationNameInfo &TargetNameInfo)
CXXTryStmt - A C++ try block, including all handlers.
OpaquePtr< QualType > ParsedType
An opaque type for threading parsed type information through the parser.
SourceLocation SecColonLoc
RecordDecl * CFError
The struct behind the CFErrorRef pointer.
bool CheckInheritingConstructorUsingDecl(UsingDecl *UD)
Additional checks for a using declaration referring to a constructor name.
A C++ nested-name-specifier augmented with source location information.
ParsedType ActOnMSVCUnknownTypeName(const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg)
Attempt to behave like MSVC in situations where lookup of an unqualified type name has failed in a de...
void DiagnoseEmptyStmtBody(SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID)
Emit DiagID if statement located on StmtLoc has a suspicious null statement as a Body,...
QualType CheckShiftOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, bool IsCompAssign=false)
bool operator!=(const AlignPackInfo &Info) const
StmtResult ActOnObjCForCollectionStmt(SourceLocation ForColLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc)
RAII class used to indicate that we are performing provisional semantic analysis to determine the val...
void MergeVarDeclTypes(VarDecl *New, VarDecl *Old, bool MergeTypeWithOld)
MergeVarDeclTypes - We parsed a variable 'New' which has the same name and scope as a previous declar...
std::unique_ptr< RecordDeclSetTy > PureVirtualClassDiagSet
PureVirtualClassDiagSet - a set of class declarations which we have emitted a list of pure virtual fu...
OMPClause * ActOnOpenMPPrivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'private' clause.
unsigned NumCleanupObjects
The number of active cleanup objects when we entered this expression evaluation context.
EnterExpressionEvaluationContext(Sema &Actions, InitListTag, bool ShouldEnter=true)
StmtResult ActOnOpenMPTargetTeamsGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams loop' after parsing of the associated statement.
void AddIntelFPGAPrivateCopiesAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
void ActOnStartDelayedMemberDeclarations(Scope *S, Decl *Record)
bool isValidSveBitcast(QualType srcType, QualType destType)
Are the two types SVE-bitcast-compatible types? I.e.
TypeResult ActOnTagTemplateIdType(TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc)
Parsed an elaborated-type-specifier that refers to a template-id, such as class T::template apply.
TypeSpecifierType isTagName(IdentifierInfo &II, Scope *S)
isTagName() - This method is called for error recovery purposes only to determine if the specified na...
void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, OverloadCandidateParamOrder PO={})
Add a C++ member function template as a candidate to the candidate set, using template argument deduc...
SemaDiagnosticBuilder CUDADiagIfHostCode(SourceLocation Loc, unsigned DiagID)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as host cod...
void checkExceptionSpecification(bool IsTopLevel, ExceptionSpecificationType EST, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr, SmallVectorImpl< QualType > &Exceptions, FunctionProtoType::ExceptionSpecInfo &ESI)
Check the given exception-specification and update the exception specification information with the r...
Writes an AST file containing the contents of a translation unit.
ImplicitConversionSequence TryImplicitConversion(Expr *From, QualType ToType, bool SuppressUserConversions, AllowedExplicit AllowExplicit, bool InOverloadResolution, bool CStyle, bool AllowObjCWritebackConversion)
ExprResult CheckCXXBooleanCondition(Expr *CondExpr, bool IsConstexpr=false)
CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
Decl * getObjCDeclContext() const
ExprResult BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
Build an Objective-C instance message expression.
StmtResult ActOnOpenMPDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute simd' after parsing of the associated statement.
void popWithoutEmitting(DelayedDiagnosticsState state)
Leave a delayed-diagnostic state that was previously pushed.
@ TDK_TooManyArguments
When performing template argument deduction for a function template, there were too many call argumen...
DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveStart(Scope *S, DeclContext *DC, DeclarationName Name, ArrayRef< std::pair< QualType, SourceLocation >> ReductionTypes, AccessSpecifier AS, Decl *PrevDeclInScope=nullptr)
Called on start of '#pragma omp declare reduction'.
DeclContext * OriginalLexicalContext
Generally null except when we temporarily switch decl contexts, like in.
CanThrowResult canThrow(const Stmt *E)
OMPClause * ActOnOpenMPUnifiedAddressClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'unified_address' clause.
DeclGroupPtrTy ActOnOpenMPAllocateDirective(SourceLocation Loc, ArrayRef< Expr * > VarList, ArrayRef< OMPClause * > Clauses, DeclContext *Owner=nullptr)
Called on well-formed '#pragma omp allocate'.
LangAS getDefaultCXXMethodAddrSpace() const
Returns default addr space for method qualifiers.
IdentifierInfo * getNSErrorIdent()
Retrieve the identifier "NSError".
@ ConstexprIf
A constant boolean condition from 'if constexpr'.
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
void DiagnoseAvailabilityOfDecl(NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReceiver=nullptr)
@ PCC_Expression
Code completion occurs within an expression.
void CodeCompleteLambdaIntroducer(Scope *S, LambdaIntroducer &Intro, bool AfterAmpersand)
OriginalCallArg(QualType OriginalParamType, bool DecomposedParam, unsigned ArgIdx, QualType OriginalArgType)
bool BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon=nullptr, bool OnlyNamespace=false)
Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier.
UsingShadowDecl * BuildUsingShadowDecl(Scope *S, BaseUsingDecl *BUD, NamedDecl *Target, UsingShadowDecl *PrevDecl)
Builds a shadow declaration corresponding to a 'using' declaration.
@ ThreeWay
This is an operator<=> that should be implemented as a series of subobject comparisons.
StmtResult ActOnOpenMPMetaDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp metadirective' after parsing of the associated statement.
@ CCEK_CaseValue
Expression in a case label.
void ActOnFinishedOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI)
Called once a target context is completed, that can be when a '#pragma omp end declare target' was en...
@ TAH_ConsiderTrivialABI
The triviality of a method affected by "trivial_abi".
@ NotEqual
This is an operator!= that should be implemented as a rewrite in terms of a == comparison.
ObjCInterfaceDecl * NSNumberDecl
The declaration of the Objective-C NSNumber class.
This file provides AST data structures related to concepts.
void AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation)
DenseMapInfo< clang::CanonicalDeclPtr< clang::FunctionDecl > > FDBaseInfo
bool isVisible(const NamedDecl *D)
Determine whether a declaration is visible to name lookup.
void CodeCompleteModuleImport(SourceLocation ImportLoc, ModuleIdPath Path)
Decl * ActOnIvar(Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind visibility)
ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDec...
const FunctionProtoType * ResolveExceptionSpec(SourceLocation Loc, const FunctionProtoType *FPT)
void diagnoseMissingImport(SourceLocation Loc, NamedDecl *Decl, MissingImportKind MIK, bool Recover=true)
Diagnose that the specified declaration needs to be visible but isn't, and suggest a module import th...
virtual bool match(QualType T)=0
Determine whether the specified type is a valid destination type for this conversion.
ExprResult BuildQualifiedTemplateIdExpr(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
StmtResult ActOnOpenMPTileDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp tile' after parsing of its clauses and the associated statement.
IdentifierResolver - Keeps track of shadowed decls on enclosing scopes.
void CodeCompleteObjCImplementationCategory(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
void CodeCompleteDesignator(const QualType BaseType, llvm::ArrayRef< Expr * > InitExprs, const Designation &D)
Trigger code completion for a record of BaseType.
Decl * ManglingContextDecl
The declaration that provides context for lambda expressions and block literals if the normal declara...
@ TPC_FriendClassTemplate
void CodeCompleteObjCPropertySynthesizeIvar(Scope *S, IdentifierInfo *PropertyName)
void InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive=false, bool DefinitionRequired=false, bool AtEndOfTU=false)
Instantiate the definition of the given function from its template.
bool IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val, bool AllowMask) const
IsValueInFlagEnum - Determine if a value is allowed as part of a flag enum.
QualType FindCompositePointerType(SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool ConvertArgs=true)
QualType BuildExtVectorType(QualType T, Expr *ArraySize, SourceLocation AttrLoc)
Build an ext-vector type.
ExprResult ActOnNoexceptSpec(Expr *NoexceptExpr, ExceptionSpecificationType &EST)
Check the given noexcept-specifier, convert its expression, and compute the appropriate ExceptionSpec...
void DiagnoseFunctionSpecifiers(const DeclSpec &DS)
Diagnose function specifiers on a declaration of an identifier that does not identify a function.
void AddIntelFPGABankWidthAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
ExprResult BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder=AtomicArgumentOrder::API)
void AddSYCLIntelFPGAMaxConcurrencyAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
AddSYCLIntelFPGAMaxConcurrencyAttr - Adds a max_concurrency attribute to a particular declaration.
bool CheckAltivecInitFromScalar(SourceRange R, QualType VecTy, QualType SrcTy)
void ActOnExitFunctionContext()
SmallVector< CallExpr *, 8 > DelayedDecltypeCalls
If we are processing a decltype type, a set of call expressions for which we have deferred checking t...
const DeclContext * getCurObjCLexicalContext() const
bool CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
Instantiate or parse a C++ default argument expression as necessary.
ExprResult PerformOpenMPImplicitIntegerConversion(SourceLocation OpLoc, Expr *Op)
bool checkStringLiteralArgumentAttr(const AttributeCommonInfo &CI, const Expr *E, StringRef &Str, SourceLocation *ArgLocation=nullptr)
@ LOLR_Template
The lookup found an overload set of literal operator templates, which expect the characters of the sp...
Slot(llvm::StringRef StackSlotLabel, ValueType Value, SourceLocation PragmaLocation, SourceLocation PragmaPushLocation)
llvm::DenseSet< std::pair< Decl *, unsigned > > InstantiatingSpecializations
Specializations whose definitions are currently being instantiated.
void diagnoseIgnoredQualifiers(unsigned DiagID, unsigned Quals, SourceLocation FallbackLoc, SourceLocation ConstQualLoc=SourceLocation(), SourceLocation VolatileQualLoc=SourceLocation(), SourceLocation RestrictQualLoc=SourceLocation(), SourceLocation AtomicQualLoc=SourceLocation(), SourceLocation UnalignedQualLoc=SourceLocation())
IRgen optimization opportunities The common pattern of short x
ASTMutationListener * getASTMutationListener() const
void DeclareImplicitDeductionGuides(TemplateDecl *Template, SourceLocation Loc)
Declare implicit deduction guides for a class template if we've not already done so.
@ AMK_Redeclaration
Merge availability attributes for a redeclaration, which requires an exact match.
Declaration of a template type parameter.
StmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc, Stmt *Body)
void MaybeSuggestAddingStaticToDecl(const FunctionDecl *D)
StmtResult ActOnCoreturnStmt(Scope *S, SourceLocation KwLoc, Expr *E)
OMPClause * ActOnOpenMPLinearClause(ArrayRef< Expr * > VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'linear' clause.
OMPClause * ActOnOpenMPNocontextClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'nocontext' clause.
bool CheckAllocatedType(QualType AllocType, SourceLocation Loc, SourceRange R)
Checks that a type is suitable as the allocated type in a new-expression.
bool DiagnoseUnexpandedParameterPacks(SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef< UnexpandedParameterPack > Unexpanded)
Diagnose unexpanded parameter packs.
bool shouldDelayDiagnostics()
Determines whether diagnostics should be delayed.
bool LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation=false)
Perform unqualified name lookup starting from a given scope.
An expression that sends a message to the given Objective-C object or class.
bool checkLiteralOperatorId(const CXXScopeSpec &SS, const UnqualifiedId &Id, bool IsUDSuffix)
bool CheckQualifiedFunctionForTypeId(QualType T, SourceLocation Loc)
CXXSpecialMember SpecialMember
The special member being declared or defined.
static NameClassification FunctionTemplate(TemplateName Name)
void actOnDelayedExceptionSpecification(Decl *Method, ExceptionSpecificationType EST, SourceRange SpecificationRange, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr)
Add an exception-specification to the given member function (or member function template).
EnforceTCBAttr * mergeEnforceTCBAttr(Decl *D, const EnforceTCBAttr &AL)
ExprResult getOpenMPCapturedExpr(VarDecl *Capture, ExprValueKind VK, ExprObjectKind OK, SourceLocation Loc)
void CodeCompleteNaturalLanguage()
void ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool IncompleteImpl=false)
ImplMethodsVsClassMethods - This is main routine to warn if any method remains unimplemented in the c...
MemberExpr * BuildMemberExpr(Expr *Base, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec *SS, SourceLocation TemplateKWLoc, ValueDecl *Member, DeclAccessPair FoundDecl, bool HadMultipleCandidates, const DeclarationNameInfo &MemberNameInfo, QualType Ty, ExprValueKind VK, ExprObjectKind OK, const TemplateArgumentListInfo *TemplateArgs=nullptr)
OpenCLOptions & getOpenCLOptions()
ExprResult ActOnUnaryExprOrTypeTraitExpr(SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, bool IsType, void *TyOrEx, SourceRange ArgRange)
ActOnUnaryExprOrTypeTraitExpr - Handle sizeof(type) and sizeof expr and the same for alignof and __al...
static FunctionDeclAndLoc getTombstoneKey()
ExprResult MaybeConvertParenListExprToParenExpr(Scope *S, Expr *ME)
This is not an AltiVec-style cast or or C++ direct-initialization, so turn the ParenListExpr into a s...
ExprResult CorrectDelayedTyposInExpr(ExprResult ER, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
const friend SemaDiagnosticBuilder & operator<<(const SemaDiagnosticBuilder &Diag, const T &Value)
Custom deleter to allow FunctionScopeInfos to be kept alive for a short time after they've been poppe...
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
@ CCK_ImplicitConversion
An implicit conversion.
void addExternalSource(ExternalSemaSource *E)
Registers an external source.
@ IncompatiblePointerSign
IncompatiblePointerSign - The assignment is between two pointers types which point to integers which ...
@ TryCapture_ExplicitByVal
@ AMK_OptionalProtocolImplementation
Merge availability attributes for an implementation of an optional protocol requirement.
FullExprArg(Sema &actions)
ExprResult BuildObjCSubscriptExpression(SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod)
Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime.
void PopExpressionEvaluationContext()
const DeclareTargetContextInfo ActOnOpenMPEndDeclareTargetDirective()
Called at the end of target region i.e. '#pragma omp end declare target'.
and static some checkers Checker The latter are built on top of the former via the Checker and CheckerVisitor and attempts to isolate them from much of the gore of the internal analysis the analyzer is basically a source code simulator that traces out possible paths of execution The state of the and the combination of state and program point is a node in an exploded which has the entry program point and initial state
RAII object to handle the state changes required to synthesize a function body.
StmtResult ActOnDeclStmt(DeclGroupPtrTy Decl, SourceLocation StartLoc, SourceLocation EndLoc)
LookupNameKind
Describes the kind of name lookup to perform.
Decl * BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, StringLiteral *AssertMessageExpr, SourceLocation RParenLoc, bool Failed)
SourceLocation CurInitSegLoc
void ActOnPragmaVisibility(const IdentifierInfo *VisType, SourceLocation PragmaLoc)
ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .
void CheckDeprecatedSYCLAttributeSpelling(const ParsedAttr &A, StringRef NewName="")
Diagnoses an attribute in the 'intelfpga' namespace and suggests using the attribute in the 'intel' n...
SourceLocation PragmaPushLocation
bool isSameOrCompatibleFunctionType(QualType Param, QualType Arg)
Compare types for equality with respect to possibly compatible function types (noreturn adjustment,...
const LangOptions & LangOpts
bool DiagnoseUnexpandedParameterPackInRequiresExpr(RequiresExpr *RE)
If the given requirees-expression contains an unexpanded reference to one of its own parameter packs,...
void LoadExternalWeakUndeclaredIdentifiers()
Load weak undeclared identifiers from the external source.
void DefineImplicitMoveConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
DefineImplicitMoveConstructor - Checks for feasibility of defining this constructor as the move const...
DelayedDiagnosticsState ProcessingContextState
void diagnoseEquivalentInternalLinkageDeclarations(SourceLocation Loc, const NamedDecl *D, ArrayRef< const NamedDecl * > Equiv)
DeclResult LookupIvarInObjCMethod(LookupResult &Lookup, Scope *S, IdentifierInfo *II)
The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
bool isSpecialMember() const
void ActOnUninitializedDecl(Decl *dcl)
void ActOnInitializerError(Decl *Dcl)
ActOnInitializerError - Given that there was an error parsing an initializer for the given declaratio...
friend class ArgumentPackSubstitutionRAII
ExprResult ActOnSYCLUniqueStableNameExpr(SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, ParsedType ParsedTy)
DeclGroupPtrTy ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType=nullptr)
bool RequireCompleteExprType(Expr *E, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
Ensure that the type of the given expression is complete.
ExprResult BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr)
@ ACK_CompAssign
A compound assignment expression.
TypeResult ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc)
Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type".
Represents a C++ using-declaration.
@ TDK_Incomplete
Template argument deduction did not deduce a value for every template parameter.
@ Global
The global module fragment, between 'module;' and a module-declaration.
bool CheckTemplateArgumentList(TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl< TemplateArgument > &Converted, bool UpdateArgsWithConversions=true, bool *ConstraintsNotSatisfied=nullptr)
Check that the given template arguments can be be provided to the given template, converting the argu...
ExprResult PerformImplicitConversion(Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit=false)
PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType.
bool CheckUsingDeclRedeclaration(SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Previous)
Checks that the given using declaration is not an invalid redeclaration.
QualType CXXCheckConditionalOperands(ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc)
Check the operands of ?: under C++ semantics.
void CalledStmt(Stmt *S)
Integrate an invoked statement into the collected data.
Represents the parsed form of a C++ template argument.
void ActOnOpenMPEndAssumesDirective()
Called on well-formed '#pragma omp end assumes'.
sema::LambdaScopeInfo * PushLambdaScope()
ExprResult ParseObjCEncodeExpression(SourceLocation AtLoc, SourceLocation EncodeLoc, SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc)
IdentifierInfo * IdentInfo
ExprResult ActOnSourceLocExpr(SourceLocExpr::IdentKind Kind, SourceLocation BuiltinLoc, SourceLocation RPLoc)
bool hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
Determine if D has a visible definition.
bool IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS, NestedNameSpecInfo &IdInfo, bool EnteringContext)
IsInvalidUnlessNestedName - This method is used for error recovery purposes to determine whether the ...
QualType BuildMatrixType(QualType T, Expr *NumRows, Expr *NumColumns, SourceLocation AttrLoc)
bool tryResolveExplicitSpecifier(ExplicitSpecifier &ExplicitSpec)
tryResolveExplicitSpecifier - Attempt to resolve the explict specifier.
ObjCCategoryDecl - Represents a category declaration.
void AddModeAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name, bool InInstantiation=false)
AddModeAttr - Adds a mode attribute to a particular declaration.
TypoCorrection CorrectTypo(const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr, bool RecordFailure=true)
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to...
void NoteAllOverloadCandidates(Expr *E, QualType DestType=QualType(), bool TakingAddress=false)
StmtResult ActOnOpenMPFlushDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp flush'.
QualType getElaboratedType(ElaboratedTypeKeyword Keyword, const CXXScopeSpec &SS, QualType T, TagDecl *OwnedTagDecl=nullptr)
Retrieve a version of the type 'T' that is elaborated by Keyword, qualified by the nested-name-specif...
@ ExplicitTemplateArgumentSubstitution
We are substituting explicit template arguments provided for a function template.
StmtResult ActOnCaseStmt(SourceLocation CaseLoc, ExprResult LHS, SourceLocation DotDotDotLoc, ExprResult RHS, SourceLocation ColonLoc)
const VarDecl * Candidate
ExprResult ActOnObjCBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind)
ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.
void diagnose(Sema &S, SourceLocation Loc, QualType T) override
@ PCC_Condition
Code completion occurs within the condition of an if, while, switch, or for statement.
StmtResult ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute parallel for simd' after parsing of the as...
ExprResult UsualUnaryConversions(Expr *E)
UsualUnaryConversions - Performs various conversions that are common to most operators (C99 6....
void CheckDeductionGuideDeclarator(Declarator &D, QualType &R, StorageClass &SC)
Check the validity of a declarator that we parsed for a deduction-guide.
void DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl< ObjCMethodDecl * > &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass)
bool hasVisibleMemberSpecialization(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if there is a visible declaration of D that is a member specialization declaration (as oppo...
Contains a late templated function.
virtual void ReadExtVectorDecls(SmallVectorImpl< TypedefNameDecl * > &Decls)
Read the set of ext_vector type declarations known to the external Sema source.
void CheckExplicitlyDefaultedFunction(Scope *S, FunctionDecl *MD)
QualType CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType)
DeclResult CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody=nullptr)
StmtResult ActOnOpenMPTargetTeamsDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute parallel for' after parsing of the associa...
StmtResult BuildObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw)
void HandleFunctionTypeMismatch(PartialDiagnostic &PDiag, QualType FromType, QualType ToType)
HandleFunctionTypeMismatch - Gives diagnostic information for differeing function types.
void AddIntelFPGAForcePow2DepthAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
void ActOnFinishKNRParamDeclarations(Scope *S, Declarator &D, SourceLocation LocAfterDecls)
void incrementMSManglingNumber()
Wrapper for void* pointer.
TemplateNameKind getTemplateNameKind() const
uint8_t PointerKind
Which kind of pointer declarator we saw.
NamedDeclSetType UnusedPrivateFields
Set containing all declared private fields that are not used.
llvm::SmallSetVector< DeclContext *, 16 > AssociatedNamespaceSet
bool InstantiateInClassInitializer(SourceLocation PointOfInstantiation, FieldDecl *Instantiation, FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiate the definition of a field from the given pattern.
bool isFDReachableFromSyclDevice(const FunctionDecl *Callee, const FunctionDecl *Caller)
std::pair< iterator, bool > insert(std::pair< Selector, Lists > &&Val)
llvm::SmallSetVector< const TypedefNameDecl *, 4 > UnusedLocalTypedefNameCandidates
Set containing all typedefs that are likely unused.
A mapping from file IDs to a record of whether we've seen nullability information in that file.
bool isCFError(RecordDecl *D)
bool ActOnCXXEnterDeclaratorScope(Scope *S, CXXScopeSpec &SS)
ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global scope or nested-name-specifi...
OverloadCandidateSet - A set of overload candidates, used in C++ overload resolution (C++ 13....
LangAS
Defines the address space values used by the address space qualifier of QualType.
llvm::SmallSetVector< NamedDecl *, 16 > NamedDeclSetType
ClassTemplateDecl * StdCoroutineTraitsCache
The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits>
static const unsigned NumNSNumberLiteralMethods
llvm::StringRef StackSlotLabel
bool containsUnexpandedParameterPacks(Declarator &D)
Determine whether the given declarator contains any unexpanded parameter packs.
bool isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name)
Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declarati...
Retains information about a function, method, or block that is currently being parsed.
@ K_Deferred
Create a deferred diagnostic, which is emitted only if the function it's attached to is codegen'ed.
void DiagnoseShadowingLambdaDecls(const sema::LambdaScopeInfo *LSI)
Diagnose shadowing for variables shadowed in the lambda record LambdaRD when these variables are capt...
DeclGroupPtrTy ActOnOpenMPDeclareMapperDirective(Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType, SourceLocation StartLoc, DeclarationName VN, AccessSpecifier AS, Expr *MapperVarRef, ArrayRef< OMPClause * > Clauses, Decl *PrevDeclInScope=nullptr)
Called on start of '#pragma omp declare mapper'.
FieldDecl * HandleField(Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS)
HandleField - Analyze a field of a C struct or a C++ data member.
StmtResult ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, NamedReturnInfo &NRInfo, bool SupressSimplerImplicitMoves)
ActOnCapScopeReturnStmt - Utility routine to type-check return statements for capturing scopes.
void ActOnForEachDeclStmt(DeclGroupPtrTy Decl)
ExprResult CreateBuiltinMatrixSubscriptExpr(Expr *Base, Expr *RowIdx, Expr *ColumnIdx, SourceLocation RBLoc)
Decl * ActOnObjCContainerStartDefinition(Decl *IDecl)
void diagnoseTypo(const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true)
void Act(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, ValueType Value)
sema::LambdaScopeInfo * getCurGenericLambda()
Retrieve the current generic lambda info, if any.
ExprResult tryConvertExprToType(Expr *E, QualType Ty)
Try to convert an expression E to type Ty.
bool canDelayFunctionBody(const Declarator &D)
Determine whether we can delay parsing the body of a function or function template until it is used,...
DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS, ArrayRef< Decl * > Group)
void LookupBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, UnresolvedSetImpl &Functions)
bool CheckForwardProtocolDeclarationForCircularDependency(IdentifierInfo *PName, SourceLocation &PLoc, SourceLocation PrevLoc, const ObjCList< ObjCProtocolDecl > &PList)
@ CCEK_TemplateArg
Value of a non-type template parameter.
std::pair< SourceLocation, bool > DeleteExprLoc
Delete-expressions to be analyzed at the end of translation unit.
TemplateNameKindForDiagnostics
Describes the detailed kind of a template name. Used in diagnostics.
ExprResult PerformObjectMemberConversion(Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, NamedDecl *Member)
Cast a base object to a member's actual type.
void DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
Defines an implicitly-declared move assignment operator.
InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation, Decl *Entity, SourceRange InstantiationRange=SourceRange())
Note that we are instantiating a class template, function template, variable template,...
ConstexprSpecKind
Define the kind of constexpr specifier.
bool RebuildTemplateParamsInCurrentInstantiation(TemplateParameterList *Params)
Rebuild the template parameters now that we know we're in a current instantiation.
void addInitCapture(sema::LambdaScopeInfo *LSI, VarDecl *Var)
Add an init-capture to a lambda scope.
void AddConversionCandidate(CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit, bool AllowExplicit, bool AllowResultConversion=true)
AddConversionCandidate - Add a C++ conversion function as a candidate in the candidate set (C++ [over...
StmtResult ActOnOpenMPParallelSectionsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement.
bool CheckLoopHintExpr(Expr *E, SourceLocation Loc)
llvm::SmallVector< DeleteExprLoc, 4 > DeleteLocs
void ConvertIntegerToTypeWarnOnOverflow(llvm::APSInt &OldVal, unsigned NewWidth, bool NewSign, SourceLocation Loc, unsigned DiagID)
ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have the specified width and sign...
StmtResult ActOnObjCAutoreleasePoolStmt(SourceLocation AtLoc, Stmt *Body)
AccessResult CheckUnresolvedMemberAccess(UnresolvedMemberExpr *E, DeclAccessPair FoundDecl)
Perform access-control checking on a previously-unresolved member access which has now been resolved ...
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
llvm::DenseSet< FunctionDeclAndLoc > LocsWithCUDACallDiags
FunctionDecls and SourceLocations for which CheckCUDACall has emitted a (maybe deferred) "bad call" d...
bool shouldLinkDependentDeclWithPrevious(Decl *D, Decl *OldDecl)
Checks if the new declaration declared in dependent context must be put in the same redeclaration cha...
void PerformPendingInstantiations(bool LocalOnly=false)
Performs template instantiation for all implicit template instantiations we have seen until this poin...
void ArgumentDependentLookup(DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, ADLResult &Functions)
Represents a pointer to an Objective C object.
bool CheckOverridingFunctionAttributes(const CXXMethodDecl *New, const CXXMethodDecl *Old)
void ActOnPragmaFPExceptions(SourceLocation Loc, LangOptions::FPExceptionModeKind)
Called on well formed '#pragma clang fp' that has option 'exceptions'.
void FinalizeVarWithDestructor(VarDecl *VD, const RecordType *DeclInitType)
FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable.
bool isDiscardedStatementContext() const
MaybeODRUseExprSet MaybeODRUseExprs
void emit(const SemaDiagnosticBuilder &DB, std::index_sequence< Is... >) const
bool buildOverloadedCallSet(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, MultiExprArg Args, SourceLocation RParenLoc, OverloadCandidateSet *CandidateSet, ExprResult *Result)
Constructs and populates an OverloadedCandidateSet from the given function.
bool CheckParamExceptionSpec(const PartialDiagnostic &NestedDiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Target, SourceLocation TargetLoc, const FunctionProtoType *Source, SourceLocation SourceLoc)
CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalen...
bool IsQualificationConversion(QualType FromType, QualType ToType, bool CStyle, bool &ObjCLifetimeConversion)
IsQualificationConversion - Determines whether the conversion from an rvalue of type FromType to ToTy...
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, FunctionDeclAndLoc > DeviceKnownEmittedFns
An inverse call graph, mapping known-emitted functions to one of their known-emitted callers (plus th...
void HideUsingShadowDecl(Scope *S, UsingShadowDecl *Shadow)
Hides a using shadow declaration.
@ CVT_Both
Emitted on host side only.
void HandleDelayedAccessCheck(sema::DelayedDiagnostic &DD, Decl *Ctx)
NamedDecl * LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc)
LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope.
void MarkTypoCorrectedFunctionDefinition(const NamedDecl *F)
TemplateNameKind ActOnTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool AllowInjectedClassName=false)
Form a template name from a name that is syntactically required to name a template,...
PragmaClangSection PragmaClangBSSSection
SynthesizedFunctionScope(Sema &S, DeclContext *DC)
virtual ~VerifyICEDiagnoser()
ExprResult BuildImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance, const Scope *S)
Builds an implicit member access expression.
ExprResult BuildArrayTypeTrait(ArrayTypeTrait ATT, SourceLocation KWLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParen)
void addAMDGPUWavesPerEUAttr(Decl *D, const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
addAMDGPUWavePersEUAttr - Adds an amdgpu_waves_per_eu attribute to a particular declaration.
unsigned FunctionScopesStart
The index of the first FunctionScope that corresponds to the current context.
Represents a C++ struct/union/class.
virtual SemaDiagnosticBuilder diagnoseNoMatch(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic complaining that the expression does not have integral or enumeration type.
void MarkVTableUsed(SourceLocation Loc, CXXRecordDecl *Class, bool DefinitionRequired=false)
Note that the vtable for the given class was used at the given location.
void checkSpecializationVisibility(SourceLocation Loc, NamedDecl *Spec)
We've found a use of a templated declaration that would trigger an implicit instantiation.
ExpressionEvaluationContext
Describes how the expressions currently being parsed are evaluated at run-time, if at all.
@ Memoization
Added for Template instantiation observation.
@ IER_Dependent
The name is a dependent name, so the results will differ from one instantiation to the next.
ParamInfo - An array of paraminfo objects is allocated whenever a function declarator is parsed.
void FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef< IdentifierLocPair > ProtocolId, SmallVectorImpl< Decl * > &Protocols)
FindProtocolDeclaration - This routine looks up protocols and issues an error if they are not declare...
ExprResult ActOnStmtExprResult(ExprResult E)
@ IncompatibleObjCWeakRef
IncompatibleObjCWeakRef - Assigning a weak-unavailable object to an object with __weak qualifier.
bool PopForceCUDAHostDevice()
Decrements our count of the number of times we've seen a pragma forcing functions to be host device.
llvm::DenseSet< Module * > & getLookupModules()
Get the set of additional modules that should be checked during name lookup.
bool EnsureTemplateArgumentListConstraints(TemplateDecl *Template, ArrayRef< TemplateArgument > TemplateArgs, SourceRange TemplateIDRange)
Ensure that the given template arguments satisfy the constraints associated with the given template,...
FPFeaturesStateRAII(Sema &S)
SourceLocation DeclIdentLoc
@ TDK_InstantiationDepth
Template argument deduction exceeded the maximum template instantiation depth (which has already been...
void CheckObjCMethodDirectOverrides(ObjCMethodDecl *method, ObjCMethodDecl *overridden)
@ All
A flag representing 'all'.
PragmaStack< StringLiteral * > BSSSegStack
@ DefaultFunctionArgumentInstantiation
We are instantiating a default argument for a function.
MemInitResult BuildMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc)
Handle a C++ member initializer.
ExprResult LookupInlineAsmIdentifier(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool IsUnevaluatedContext)
OMPClause * ActOnOpenMPInReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=llvm::None)
Called on well-formed 'in_reduction' clause.
void DiagnoseUnguardedAvailabilityViolations(Decl *FD)
Issue any -Wunguarded-availability warnings in FD.
LateParsedTemplateMapT LateParsedTemplateMap
void SetParamDefaultArgument(ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
ExternalSemaSource * getExternalSource() const
StmtResult ActOnSEHLeaveStmt(SourceLocation Loc, Scope *CurScope)
NonTagKind getNonTagTypeDeclKind(const Decl *D, TagTypeKind TTK)
Given a non-tag type declaration, returns an enum useful for indicating what kind of non-tag type thi...
NameClassification(ParsedType Type)
LazyDeclPtr StdAlignValT
The C++ "std::align_val_t" enum class, which is defined by the C++ standard library.
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
void ActOnUndeclaredTypeTemplateName(Scope *S, TemplateTy &Name, TemplateNameKind &TNK, SourceLocation NameLoc, IdentifierInfo *&II)
Try to resolve an undeclared template name as a type template.
void CheckCXXDefaultArguments(FunctionDecl *FD)
CheckCXXDefaultArguments - Verify that the default arguments for a function declaration are well-form...
IdentifierInfo * InventAbbreviatedTemplateParameterTypeName(IdentifierInfo *ParamName, unsigned Index)
Invent a new identifier for parameters of abbreviated templates.
DeclContext * computeDeclContext(QualType T)
Compute the DeclContext that is associated with the given type.
DefaultedComparisonKind
Kinds of defaulted comparison operator functions.
unsigned ActOnReenterTemplateScope(Decl *Template, llvm::function_ref< Scope *()> EnterScope)
void CheckImplicitSpecialMemberDeclaration(Scope *S, FunctionDecl *FD)
Check a completed declaration of an implicit special member.
ExprResult ActOnRequiresClause(ExprResult ConstraintExpr)
ExprResult SemaBuiltinShuffleVector(CallExpr *TheCall)
SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
OpaquePtr< DeclGroupRef > DeclGroupPtrTy
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
bool CheckUnaryExprOrTypeTraitOperand(Expr *E, UnaryExprOrTypeTrait ExprKind)
Check the constraints on expression operands to unary type expression and type traits.
UnusedFileScopedDeclsType UnusedFileScopedDecls
The set of file scoped decls seen so far that have not been used and must warn if not used.
ForRangeStatus BuildForRangeBeginEndCall(SourceLocation Loc, SourceLocation RangeLoc, const DeclarationNameInfo &NameInfo, LookupResult &MemberLookup, OverloadCandidateSet *CandidateSet, Expr *Range, ExprResult *CallExpr)
Build a call to 'begin' or 'end' for a C++11 for-range statement.
void CodeCompleteObjCInstanceMessage(Scope *S, Expr *Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, ObjCInterfaceDecl *Super=nullptr)
TemplateDeductionResult
Describes the result of template argument deduction.
AccessResult
A copy of Sema's enum without AR_delayed.
bool CheckIfOverriddenFunctionIsMarkedFinal(const CXXMethodDecl *New, const CXXMethodDecl *Old)
CheckForFunctionMarkedFinal - Checks whether a virtual member function overrides a virtual member fun...
llvm::DenseSet< Module * > LookupModulesCache
Cache of additional modules that should be used for name lookup within the current template instantia...
ModuleImportState
An enumeration to represent the transition of states in parsing module fragments and imports.
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
void AddFactoryMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false)
AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
void DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr)
DiagnoseAssignmentEnum - Warn if assignment to enum is a constant integer not in the range of enum va...
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
ExprResult ActOnDependentIdExpression(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool isAddressOfOperand, const TemplateArgumentListInfo *TemplateArgs)
ActOnDependentIdExpression - Handle a dependent id-expression that was just parsed.
bool isOpenMPDeclareMapperVarDeclAllowed(const VarDecl *VD) const
NamedDecl * ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef< BindingDecl * > Bindings=None)
void DefineImplicitDefaultConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default...
For a defaulted function, the kind of defaulted function that it is.
@ Compatible
Compatible - the types are compatible according to the standard.
void DeclareGlobalAllocationFunction(DeclarationName Name, QualType Return, ArrayRef< QualType > Params)
DeclareGlobalAllocationFunction - Declares a single implicit global allocation function if it doesn't...
void makeModuleVisible(Module *Mod, SourceLocation ImportLoc)
void addSyclOpenCLKernel(const FunctionDecl *SyclKernel, FunctionDecl *OpenCLKernel)
QualType CheckNonTypeTemplateParameterType(TypeSourceInfo *&TSI, SourceLocation Loc)
Check that the type of a non-type template parameter is well-formed.
QualType QIDNSCopying
id<NSCopying> type.
CXXRecordDecl * getCurrentInstantiationOf(NestedNameSpecifier *NNS)
If the given nested name specifier refers to the current instantiation, return the declaration that c...
@ IntToBlockPointer
IntToBlockPointer - The assignment converts an int to a block pointer.
void DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
Defines an implicitly-declared copy assignment operator.
sema::BlockScopeInfo * getCurBlock()
Retrieve the current block, if any.
StmtResult ActOnOpenMPSectionDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp section' after parsing of the associated statement.
OMPClause * ActOnOpenMPUsesAllocatorClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< UsesAllocatorsData > Data)
Called on well-formed 'uses_allocators' clause.
ExprResult checkPseudoObjectRValue(Expr *E)
bool IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base)
Determine whether the type Derived is a C++ class that is derived from the type Base.
@ TDK_DeducedMismatch
After substituting deduced template arguments, a dependent parameter type did not match the correspon...
IdentifierSourceLocations TypoCorrectionFailures
A cache containing identifiers for which typo correction failed and their locations,...
ExprResult PerformObjectArgumentInitialization(Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method)
PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the...
QualType BuildBlockPointerType(QualType T, SourceLocation Loc, DeclarationName Entity)
Build a block pointer type.
void CodeCompleteAfterFunctionEquals(Declarator &D)
TemplateArgumentLoc getTemplateArgumentPackExpansionPattern(TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis, Optional< unsigned > &NumExpansions) const
Returns the pattern of the pack expansion for a template argument.
IdentifierInfo * getFloat128Identifier() const
ExprResult ImpCastExprToType(Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_PRValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
Decl * SubstDecl(Decl *D, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
ExprResult CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr)
void PushExpressionEvaluationContext(ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other)
Decl * ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams)
Handle a friend type declaration.
ErrorAttr * mergeErrorAttr(Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic)
bool isImmediateFunctionContext() const
bool CheckQualifiedMemberReference(Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, const LookupResult &R)
StmtResult BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery=false)
llvm::DenseMap< Decl *, SmallVector< PartialDiagnosticAt, 1 > > SuppressedDiagnosticsMap
For each declaration that involved template argument deduction, the set of diagnostics that were supp...
OMPClause * ActOnOpenMPInclusiveClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'inclusive' clause.
Expr * AllocatorTraits
Allocator traits.
SemaDiagnosticBuilder diagIfOpenMPDeviceCode(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
static Scope * getScopeForDeclContext(Scope *S, DeclContext *DC)
Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope.
SourceLocation CurrentPragmaLocation
Iterator range representation begin:end[:step].
void PrintPragmaAttributeInstantiationPoint()
TypePropertyCache< Private > Cache
void ActOnStartTrailingRequiresClause(Scope *S, Declarator &D)
CXXDestructorDecl * DeclareImplicitDestructor(CXXRecordDecl *ClassDecl)
Declare the implicit destructor for the given class.
void DiagnoseReturnInConstructorExceptionHandler(CXXTryStmt *TryBlock)
ExprResult ActOnFinishFullExpr(Expr *Expr, bool DiscardedValue)
QualType BuildObjCTypeParamType(const ObjCTypeParamDecl *Decl, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false)
Build an Objective-C type parameter type.
void AddSYCLDeviceHasAttr(Decl *D, const AttributeCommonInfo &CI, Expr **Exprs, unsigned Size)
llvm::Optional< bool > getKnownValue() const
void ActOnPragmaMSVtorDisp(PragmaMsStackAction Action, SourceLocation PragmaLoc, MSVtorDispMode Value)
Called on well formed #pragma vtordisp().
void CheckOverrideControl(NamedDecl *D)
CheckOverrideControl - Check C++11 override control semantics.
void CalledDecl(SourceLocation CallLoc, const CXXMethodDecl *Method)
Integrate another called method into the collected data.
ArrayRef< TemplateArgument > template_arguments() const
bool DisableTypoCorrection
Tracks whether we are in a context where typo correction is disabled.
@ TDK_ConstraintsNotSatisfied
The deduced arguments did not satisfy the constraints associated with the template.
IfExistsResult
Describes the result of an "if-exists" condition check.
const TypoExprState & getTypoExprState(TypoExpr *TE) const
StandardConversionSequence - represents a standard conversion sequence (C++ 13.3.3....
void createImplicitModuleImportForErrorRecovery(SourceLocation Loc, Module *Mod)
Create an implicit import of the given module at the given source location, for error recovery,...
void MarkBaseAndMemberDestructorsReferenced(SourceLocation Loc, CXXRecordDecl *Record)
MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of...
CXXRecordDecl * getStdBadAlloc() const
bool CheckObjCARCUnavailableWeakConversion(QualType castType, QualType ExprType)
void ActOnPragmaMSStruct(PragmaMSStructKind Kind)
ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off].
TypeResult actOnObjCTypeArgsAndProtocolQualifiers(Scope *S, SourceLocation Loc, ParsedType BaseType, SourceLocation TypeArgsLAngleLoc, ArrayRef< ParsedType > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< Decl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc)
Build a specialized and/or protocol-qualified Objective-C type.
ExprResult ActOnCoawaitExpr(Scope *S, SourceLocation KwLoc, Expr *E)
This an attribute introduced by #pragma clang attribute.
void CUDASetLambdaAttrs(CXXMethodDecl *Method)
Set device or host device attributes on the given lambda operator() method.
StmtResult ActOnExprStmtError()
StmtResult SubstStmt(Stmt *S, const MultiLevelTemplateArgumentList &TemplateArgs)
MemInitResult BuildDelegatingInitializer(TypeSourceInfo *TInfo, Expr *Init, CXXRecordDecl *ClassDecl)
llvm::DenseMap< ParmVarDecl *, llvm::TinyPtrVector< ParmVarDecl * > > UnparsedDefaultArgInstantiationsMap
ActionResult< Decl * > DeclResult
void ActOnFinishCXXMemberDecls()
Perform any semantic analysis which needs to be delayed until all pending class member declarations h...
void Emit(const DiagnosticBuilder &DB) const
A requires-expression requirement which queries the existence of a type name or type template special...
Describes whether we've seen any nullability information for the given file.
A helper class for building up ExtParameterInfos.
ExprResult PerformCopyInitialization(const InitializedEntity &Entity, SourceLocation EqualLoc, ExprResult Init, bool TopLevelOfInitList=false, bool AllowExplicit=false)
IdentifierResolver IdResolver
bool CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPtOfInstantiation, bool &SuppressNew)
Diagnose cases where we have an explicit template specialization before/after an explicit template in...
bool isInOpenMPDeclareTargetContext() const
Return true inside OpenMP declare target region.
ExprResult ActOnTypeTrait(TypeTrait Kind, SourceLocation KWLoc, ArrayRef< ParsedType > Args, SourceLocation RParenLoc)
Parsed one of the type trait support pseudo-functions.
OMPClause * ActOnOpenMPAcquireClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'acquire' clause.
concepts::Requirement * ActOnCompoundRequirement(Expr *E, SourceLocation NoexceptLoc)
QualType SubstAutoTypeDependent(QualType TypeWithAuto)
void PushCapturedRegionScope(Scope *RegionScope, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K, unsigned OpenMPCaptureLevel=0)
ExprResult BuildCoyieldExpr(SourceLocation KwLoc, Expr *E)
FullExprArg MakeFullExpr(Expr *Arg)
OMPClause * ActOnOpenMPNumTasksClause(Expr *NumTasks, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_tasks' clause.
Declaration of a class template.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
@ TNK_Type_template
The name refers to a template whose specialization produces a type.
CleanupInfo ParentCleanup
Whether the enclosing context needed a cleanup.
QualType BuildFunctionType(QualType T, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI)
Build a function type.
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
bool tryToRecoverWithCall(ExprResult &E, const PartialDiagnostic &PD, bool ForceComplain=false, bool(*IsPlausibleResult)(QualType)=nullptr)
Try to recover by turning the given expression into a call.
void PopParsingClass(ParsingClassState state)
void ActOnObjCTemporaryExitContainerContext(DeclContext *DC)
Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constr...
void ProcessStmtAttributes(Stmt *Stmt, const ParsedAttributes &InAttrs, SmallVectorImpl< const Attr * > &OutAttrs)
Process the attributes before creating an attributed statement.
bool ResolveAndFixSingleFunctionTemplateSpecialization(ExprResult &SrcExpr, bool DoFunctionPointerConverion=false, bool Complain=false, SourceRange OpRangeForComplaining=SourceRange(), QualType DestTypeForComplaining=QualType(), unsigned DiagIDForComplaining=0)
bool CheckFunctionTemplateSpecialization(FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous, bool QualifiedFriend=false)
Perform semantic analysis for the given function template specialization.
TypeSourceInfo * SubstFunctionDeclType(TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, CXXRecordDecl *ThisContext, Qualifiers ThisTypeQuals)
A form of SubstType intended specifically for instantiating the type of a FunctionDecl.
const llvm::MapVector< FieldDecl *, DeleteLocs > & getMismatchingDeleteExpressions() const
Retrieves list of suspicious delete-expressions that will be checked at the end of translation unit.
SourceLocation CurrentPragmaLocation
Decl * ActOnTemplatedFriendTag(Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, MultiTemplateParamsArg TempParamLists)
Handle a friend tag declaration where the scope specifier was templated.
void ActOnDelayedCXXMethodParameter(Scope *S, Decl *Param)
ActOnDelayedCXXMethodParameter - We've already started a delayed C++ method declaration.
@ NC_TypeTemplate
The name was classified as a template whose specializations are types.
@ TDK_InvalidExplicitArguments
The explicitly-specified template arguments were not valid template arguments for the given template.
void completeExprArrayBound(Expr *E)
void addSyclDeviceDecl(Decl *d)
ExprResult ActOnExpressionTrait(ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
ActOnExpressionTrait - Parsed one of the unary type trait support pseudo-functions.
LangOptions::PragmaMSPointersToMembersKind MSPointerToMemberRepresentationMethod
Controls member pointer representation format under the MS ABI.
@ ForExternalRedeclaration
The lookup results will be used for redeclaration of a name with external linkage; non-visible lookup...
Represents a C++ template name within the type system.
@ DeclaringSpecialMember
We are declaring an implicit special member function.
RedeclarationKind
Specifies whether (or how) name lookup is being performed for a redeclaration (vs.
Data for list of allocators.
ParenExpr - This represents a parethesized expression, e.g.
@ CCK_CStyleCast
A C-style cast.
StmtResult ActOnOpenMPTaskyieldDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskyield'.
const IdentifierInfo * Namespace
The namespace of this push group.
llvm::MapVector< const FunctionDecl *, std::unique_ptr< LateParsedTemplate > > LateParsedTemplateMapT
ExprResult ActOnCharacterConstant(const Token &Tok, Scope *UDLScope=nullptr)
ExprResult BuildObjCNumericLiteral(SourceLocation AtLoc, Expr *Number)
BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression.
Represents a prototype with parameter type info, e.g.
void CodeCompleteObjCClassMessage(Scope *S, ParsedType Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, bool IsSuper=false)
void CheckShadowingDeclModification(Expr *E, SourceLocation Loc)
Warn if 'E', which is an expression that is about to be modified, refers to a shadowing declaration.
void DeclareImplicitEqualityComparison(CXXRecordDecl *RD, FunctionDecl *Spaceship)
bool hasVisibleDeclaration(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine whether any declaration of an entity is visible.
void WarnConflictingTypedMethods(ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
bool inferObjCARCLifetime(ValueDecl *decl)
OMPClause * ActOnOpenMPSingleExprWithArgClause(OpenMPClauseKind Kind, ArrayRef< unsigned > Arguments, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, ArrayRef< SourceLocation > ArgumentsLoc, SourceLocation DelimLoc, SourceLocation EndLoc)
static const char * getPrintable(const char *S)
EnableIfAttr * CheckEnableIf(FunctionDecl *Function, SourceLocation CallLoc, ArrayRef< Expr * > Args, bool MissingImplicitThis=false)
Check the enable_if expressions on the given function.
@ CompatiblePointerDiscardsQualifiers
CompatiblePointerDiscardsQualifiers - The assignment discards c/v/r qualifiers, which we accept as an...
ExprResult ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors)
ParseObjCSelectorExpression - Build selector expression for @selector.
bool shouldIgnoreInHostDeviceCheck(FunctionDecl *Callee)
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
TemplateParameterList * SubstTemplateParams(TemplateParameterList *Params, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
bool CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R=nullptr, const UsingDecl *UD=nullptr)
Checks that the given nested-name qualifier used in a using decl in the current context is appropriat...
void CheckTemplatePartialSpecialization(ClassTemplatePartialSpecializationDecl *Partial)
CXXRecordDecl * getCurrentClass(Scope *S, const CXXScopeSpec *SS)
Get the class that is directly named by the current context.
static bool getPrintable(bool B)
The base class of all kinds of template declarations (e.g., class, function, etc.).
ExprResult PerformMoveOrCopyInitialization(const InitializedEntity &Entity, const NamedReturnInfo &NRInfo, Expr *Value, bool SupressSimplerImplicitMoves=false)
Perform the initialization of a potentially-movable value, which is the result of return value.
bool ActOnTypeConstraint(const CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
TypeSourceInfo * SubstAutoTypeSourceInfoDependent(TypeSourceInfo *TypeWithAuto)
ExprResult ActOnSYCLBuiltinNumFieldsExpr(ParsedType PT)
Get the number of fields or captures within the parsed type.
static FunctionDeclAndLoc getEmptyKey()
QualType CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation OpLoc, bool isIndirect)
Represents a delete expression for memory deallocation and destructor calls, e.g.
bool CheckNonDependentConversions(FunctionTemplateDecl *FunctionTemplate, ArrayRef< QualType > ParamTypes, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, ConversionSequenceList &Conversions, bool SuppressUserConversions, CXXRecordDecl *ActingContext=nullptr, QualType ObjectType=QualType(), Expr::Classification ObjectClassification={}, OverloadCandidateParamOrder PO={})
Check that implicit conversion sequences can be formed for each argument whose corresponding paramete...
bool isInOpenMPTargetExecutionDirective() const
Return true inside OpenMP target region.
bool ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS, const DeclSpec &DS, SourceLocation ColonColonLoc)
bool isKnownName(StringRef name)
void adjustMemberFunctionCC(QualType &T, bool IsStatic, bool IsCtorOrDtor, SourceLocation Loc)
Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly.
void DiagnoseNonDefaultPragmaAlignPack(PragmaAlignPackDiagnoseKind Kind, SourceLocation IncludeLoc)
ExprResult BuildCaptureInit(const sema::Capture &Capture, SourceLocation ImplicitCaptureLoc, bool IsOpenMPMapping=false)
Initialize the given capture with a suitable expression.
void ActOnFinishDelayedAttribute(Scope *S, Decl *D, ParsedAttributes &Attrs)
ActOnFinishDelayedAttribute - Invoked when we have finished parsing an attribute for which parsing is...
@ Private
The private module fragment, between 'module :private;' and the end of the translation unit.
ExprResult CreateUnresolvedLookupExpr(CXXRecordDecl *NamingClass, NestedNameSpecifierLoc NNSLoc, DeclarationNameInfo DNI, const UnresolvedSetImpl &Fns, bool PerformADL=true)
@ ACK_Conditional
A conditional (?:) operator.
SYCLIntegrationFooter & getSyclIntegrationFooter()
void InstantiateMemInitializers(CXXConstructorDecl *New, const CXXConstructorDecl *Tmpl, const MultiLevelTemplateArgumentList &TemplateArgs)
void setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD)
OpenMPDefaultmapClauseModifier
OpenMP modifiers for 'defaultmap' clause.
QualType ProduceCallSignatureHelp(Expr *Fn, ArrayRef< Expr * > Args, SourceLocation OpenParLoc)
Determines the preferred type of the current function argument, by examining the signatures of all po...
bool CheckExceptionSpecSubset(const PartialDiagnostic &DiagID, const PartialDiagnostic &NestedDiagID, const PartialDiagnostic &NoteID, const PartialDiagnostic &NoThrowDiagID, const FunctionProtoType *Superset, SourceLocation SuperLoc, const FunctionProtoType *Subset, SourceLocation SubLoc)
CheckExceptionSpecSubset - Check whether the second function type's exception specification is a subs...
Decl - This represents one declaration (or definition), e.g.
bool CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody=nullptr)
Checks the validity of a template parameter list, possibly considering the template parameter list fr...
void AddSYCLUsesAspectsAttr(Decl *D, const AttributeCommonInfo &CI, Expr **Exprs, unsigned Size)
PoppedFunctionScopePtr PopFunctionScopeInfo(const sema::AnalysisBasedWarnings::Policy *WP=nullptr, const Decl *D=nullptr, QualType BlockType=QualType())
Pop a function (or block or lambda or captured region) scope from the stack.
void AddSurrogateCandidate(CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, Expr *Object, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
AddSurrogateCandidate - Adds a "surrogate" candidate function that converts the given Object to a fun...
std::pair< VarDecl *, Expr * > get() const
llvm::SmallSetVector< CXXRecordDecl *, 16 > AssociatedClassSet
SourceLocation getLocationOfStringLiteralByte(const StringLiteral *SL, unsigned ByteNo) const
void ActOnFinishOfCompoundStmt()
StmtResult ActOnIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
RAII object that enters a new expression evaluation context.
void PerformDependentDiagnostics(const DeclContext *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
SmallVector< PragmaAttributeGroup, 2 > PragmaAttributeStack
ExprResult BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
Build an Objective-C class message expression.
Represents a ValueDecl that came out of a declarator.
void BuildVariableInstantiation(VarDecl *NewVar, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs, LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner, LocalInstantiationScope *StartingScope, bool InstantiatingVarTemplate=false, VarTemplateSpecializationDecl *PrevVTSD=nullptr)
BuildVariableInstantiation - Used after a new variable has been created.
void CodeCompleteTag(Scope *S, unsigned TagSpec)
void ActOnStartStmtExpr()
Base wrapper for a particular "section" of type source info.
bool hasStructuralCompatLayout(Decl *D, Decl *Suggested)
Determine if D and Suggested have a structurally compatible layout as described in C11 6....
void ActOnPragmaMSComment(SourceLocation CommentLoc, PragmaMSCommentKind Kind, StringRef Arg)
ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg").
bool checkThisInStaticMemberFunctionType(CXXMethodDecl *Method)
Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-...
ExprResult CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *input, bool RequiresADL=true)
Create a unary operation that may resolve to an overloaded operator.
Represents one property declaration in an Objective-C interface.
QualType CheckDestructorDeclarator(Declarator &D, QualType R, StorageClass &SC)
CheckDestructorDeclarator - Called by ActOnDeclarator to check the well-formednes of the destructor d...
QualType CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind)
Interesting information about a specific parameter that can't simply be reflected in parameter's type...
TentativeAnalysisScope(Sema &SemaRef)
void ActOnOpenMPLoopInitialization(SourceLocation ForLoc, Stmt *Init)
Check if the current region is an OpenMP loop region and if it is, mark loop control variable,...
NamedDecl * findLocallyScopedExternCDecl(DeclarationName Name)
Look for a locally scoped extern "C" declaration by the given name.
Decl * ActOnExceptionDeclarator(Scope *S, Declarator &D)
ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch handler.
StmtResult ActOnOpenMPTeamsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp teams' after parsing of the associated statement.
static NameClassification NonType(NamedDecl *D)
NamedDecl * ActOnTypedefDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous)
DeductionFailureInfo MakeDeductionFailureInfo(ASTContext &Context, Sema::TemplateDeductionResult TDK, sema::TemplateDeductionInfo &Info)
Convert from Sema's representation of template deduction information to the form used in overload-can...
bool isLibstdcxxEagerExceptionSpecHack(const Declarator &D)
Determine if we're in a case where we need to (incorrectly) eagerly parse an exception specification ...
Decl * ActOnDeclarator(Scope *S, Declarator &D)
llvm::PointerIntPair< CXXRecordDecl *, 3, CXXSpecialMember > SpecialMemberDecl
@ TDK_MiscellaneousDeductionFailure
Deduction failed; that's all we know.
ExprResult ActOnInstanceMessage(Scope *S, Expr *Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
StmtResult ActOnOpenMPTeamsDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute simd' after parsing of the associated statement.
concepts::TypeRequirement * BuildTypeRequirement(TypeSourceInfo *Type)
void AddBuiltinOperatorCandidates(OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
AddBuiltinOperatorCandidates - Add the appropriate built-in operator overloads to the candidate set (...
~GlobalEagerInstantiationScope()
OpenMPAtomicDefaultMemOrderClauseKind
OpenMP attributes for 'atomic_default_mem_order' clause.
DeduceAutoResult DeduceAutoType(TypeSourceInfo *AutoType, Expr *&Initializer, QualType &Result, Optional< unsigned > DependentDeductionDepth=None, bool IgnoreConstraints=false)
ExprResult DefaultLvalueConversion(Expr *E)
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
The information about the darwin SDK that was used during this compilation.
void EndOpenMPDSABlock(Stmt *CurDirective)
Called on end of data sharing attribute block.
static NameClassification DependentNonType()
ParsedType getConstructorName(IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, bool EnteringContext)
OMPClause * ActOnOpenMPLastprivateClause(ArrayRef< Expr * > VarList, OpenMPLastprivateModifier LPKind, SourceLocation LPKindLoc, SourceLocation ColonLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'lastprivate' clause.
void ActOnFinishDelayedCXXMethodDeclaration(Scope *S, Decl *Method)
ActOnFinishDelayedCXXMethodDeclaration - We have finished processing the delayed method declaration f...
concepts::NestedRequirement * BuildNestedRequirement(Expr *E)
void ActOnComment(SourceRange Comment)
DeclGroupPtrTy ActOnForwardProtocolDeclaration(SourceLocation AtProtoclLoc, ArrayRef< IdentifierLocPair > IdentList, const ParsedAttributesView &attrList)
ActOnForwardProtocolDeclaration - Handle @protocol foo;.
void redelayDiagnostics(sema::DelayedDiagnosticPool &pool)
bool LookupInlineAsmField(StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc)
bool isEmptyCudaConstructor(SourceLocation Loc, CXXConstructorDecl *CD)
QualType NSStringPointer
Pointer to NSString type (NSString *).
void popCodeSynthesisContext()
@ K_ImmediateWithCallStack
Emit the diagnostic immediately, and, if it's a warning or error, also emit a call stack showing how ...
@ AFS_Class
Only look for allocation functions in the scope of the allocated class.
Sema - This implements semantic analysis and AST building for C.
ParsedType ActOnObjCInstanceType(SourceLocation Loc)
The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration...
ExprResult ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind)
Called on correct id-expression from the '#pragma omp threadprivate'.
void DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name, bool OverridingProtocolProperty)
DiagnosePropertyMismatch - Compares two properties for their attributes and types and warns on a vari...
bool DiagnoseUseOfDecl(NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReciever=nullptr)
Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.
void AddFixItHint(const FixItHint &Hint) const
@ NC_Type
The name was classified as a type.
LocalInstantiationScope * Scope
void CheckExtraCXXDefaultArguments(Declarator &D)
CheckExtraCXXDefaultArguments - Check for any extra default arguments in the declarator,...
virtual void diagnose(Sema &S, SourceLocation Loc, QualType T)=0
SwiftNameAttr * mergeSwiftNameAttr(Decl *D, const SwiftNameAttr &SNA, StringRef Name)
EnumDecl * getStdAlignValT() const
bool IvarBacksCurrentMethodAccessor(ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV)
IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Meth...
CXXMethodDecl * DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl)
Declare the implicit copy assignment operator for the given class.
SmallVector< PragmaAttributeEntry, 2 > Entries
void PopParsingDeclaration(ParsingDeclState state, Decl *decl)
QualType BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity)
Build an array type.
void addFDToReachableFromSyclDevice(const FunctionDecl *Callee, const FunctionDecl *Caller)
ExprResult BuildExpressionTrait(ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
void CodeCompleteUsingDirective(Scope *S)
Abstract interface for a consumer of code-completion information.
LazyVector< VarDecl *, ExternalSemaSource, &ExternalSemaSource::ReadTentativeDefinitions, 2, 2 > TentativeDefinitionsType
ExprResult ActOnConditionalOp(SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr)
ActOnConditionalOp - Parse a ?: operation.
StmtResult ActOnOpenMPTargetEnterDataDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target enter data' after parsing of the associated statement.
OMPClause * ActOnOpenMPDistScheduleClause(OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
Called on well-formed 'dist_schedule' clause.
bool resolveAndFixAddressOfSingleOverloadCandidate(ExprResult &SrcExpr, bool DoFunctionPointerConversion=false)
Given an overloaded function, tries to turn it into a non-overloaded function reference using resolve...
void InstantiateDefaultCtorDefaultArgs(CXXConstructorDecl *Ctor)
In the MS ABI, we need to instantiate default arguments of dllexported default constructors along wit...
ExprResult BuildUnaryOp(Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *Input)
~TentativeAnalysisScope()
bool handlerCanCatch(QualType HandlerType, QualType ExceptionType)
friend ExprResult ExprError(const SemaDiagnosticBuilder &)
void AddSYCLIntelSchedulerTargetFmaxMhzAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
ExprResult SubstInitializer(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs, bool CXXDirectInit)
CXXRecordDecl * getTemplatedDecl() const
Get the underlying class declarations of the template.
Represents a lazily-loaded vector of data.
OMPClause * ActOnOpenMPIsDevicePtrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'is_device_ptr' clause.
CCEKind
Contexts in which a converted constant expression is required.
void diagnoseNullableToNonnullConversion(QualType DstType, QualType SrcType, SourceLocation Loc)
Warn if we're implicitly casting from a _Nullable pointer type to a _Nonnull one.
bool IsIntegralPromotion(Expr *From, QualType FromType, QualType ToType)
IsIntegralPromotion - Determines whether the conversion from the expression From (whose potentially-a...
static NameClassification VarTemplate(TemplateName Name)
@ LookupRedeclarationWithLinkage
Look up an ordinary name that is going to be redeclared as a name with linkage.
SourceLocation getTemplateKeywordLoc() const
ExprResult TransformToPotentiallyEvaluated(Expr *E)
void DiagnoseUseOfUnimplementedSelectors()
bool DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain=true)
Determine whether we would be unable to instantiate this template (because it either has no definitio...
QualType CheckSubtractionOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy=nullptr)
Data structure for iterator expression.
SourceLocation PragmaLocation
FileNullabilityMap NullabilityMap
A mapping that describes the nullability we've seen in each header file.
ExprResult ActOnOpenMPCall(ExprResult Call, Scope *Scope, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig)
Given the potential call expression Call, determine if there is a specialization via the OpenMP decla...
void enterParenExpr(SourceLocation Tok, SourceLocation LParLoc)
@ DefaultTemplateArgumentChecking
We are checking the validity of a default template argument that has been used when naming a template...
SYCLIntelFPGASpeculatedIterationsAttr * BuildSYCLIntelFPGASpeculatedIterationsAttr(const AttributeCommonInfo &CI, Expr *E)
bool CheckObjCDeclScope(Decl *D)
Checks that the Objective-C declaration is declared in the global scope.
SmallVector< CXXRecordDecl *, 4 > DelayedDllExportClasses
StmtResult ActOnOpenMPOrderedDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp ordered' after parsing of the associated statement.
OpenMPClauseKind isOpenMPPrivateDecl(ValueDecl *D, unsigned Level, unsigned CapLevel) const
Check if the specified variable is used in 'private' clause.
virtual SemaDiagnosticBuilder diagnoseFold(Sema &S, SourceLocation Loc)
CXXConstructorDecl * LookupMovingConstructor(CXXRecordDecl *Class, unsigned Quals)
Look up the moving constructor for the given class.
void LateTemplateParserCleanupCB(void *P)
std::pair< CXXRecordDecl *, SourceLocation > VTableUse
The list of classes whose vtables have been used within this translation unit, and the source locatio...
llvm::MapVector< FieldDecl *, DeleteLocs > DeleteExprs
bool checkAddressOfFunctionIsAvailable(const FunctionDecl *Function, bool Complain=false, SourceLocation Loc=SourceLocation())
Returns whether the given function's address can be taken or not, optionally emitting a diagnostic if...
@ Normal
A normal translation unit fragment.
bool CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ThrowTy, Expr *E)
CheckCXXThrowOperand - Validate the operand of a throw.
TemplateDeductionResult SubstituteExplicitTemplateArguments(FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo &ExplicitTemplateArgs, SmallVectorImpl< DeducedTemplateArgument > &Deduced, SmallVectorImpl< QualType > &ParamTypes, QualType *FunctionType, sema::TemplateDeductionInfo &Info)
Substitute the explicitly-provided template arguments into the given function template according to C...
ResultTypeCompatibilityKind
Describes the compatibility of a result type with its method.
NamedDecl * ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists)
bool isConstantEvaluated()
ParsedAttributes - A collection of parsed attributes.
SourceRange InstantiationRange
The source range that covers the construct that cause the instantiation, e.g., the template-id that c...
A template argument list.
bool isModulePurview() const
Does this Module scope describe part of the purview of a named C++ module?
bool checkThisInStaticMemberFunctionAttributes(CXXMethodDecl *Method)
Check whether 'this' shows up in the attributes of the given static member function.
Selector RespondsToSelectorSel
will hold 'respondsToSelector:'
void PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext=true)
Add this decl to the scope shadowed decl chains.
ExprResult BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, const Scope *S, TypeSourceInfo **RecoveryTSI=nullptr)
BuildQualifiedDeclarationNameExpr - Build a C++ qualified declaration name, generally during template...
bool RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
Ensure that the type T is a literal type.
FunctionDecl * InstantiateFunctionDeclaration(FunctionTemplateDecl *FTD, const TemplateArgumentList *Args, SourceLocation Loc)
Instantiate (or find existing instantiation of) a function template with a given set of template argu...
QualType OriginalParamType
ParsedType getType() const
@ FoundFunctions
This is assumed to be a template name because lookup found one or more functions (but no function tem...
@ OCK_CategoryImplementation
StmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc, SourceLocation StarLoc, Expr *DestExp)
void AddSYCLAddIRAttributesKernelParameterAttr(Decl *D, const AttributeCommonInfo &CI, MutableArrayRef< Expr * > Args)
ExprResult BuildObjCBoxedExpr(SourceRange SR, Expr *ValueExpr)
BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression.
bool isAcceptableNestedNameSpecifier(const NamedDecl *SD, bool *CanCorrect=nullptr)
Determines whether the given declaration is an valid acceptable result for name lookup of a nested-na...
void startOpenMPCXXRangeFor()
If the current region is a range loop-based region, mark the start of the loop construct.
ExprResult ActOnNumericConstant(const Token &Tok, Scope *UDLScope=nullptr)
void DeclareGlobalNewDelete()
DeclareGlobalNewDelete - Declare the global forms of operator new and delete.
@ KernelConstStaticVariable
OMPClause * ActOnOpenMPUseDevicePtrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'use_device_ptr' clause.
void CodeCompletePostfixExpression(Scope *S, ExprResult LHS, QualType PreferredType)
ExprResult ActOnArrayTypeTrait(ArrayTypeTrait ATT, SourceLocation KWLoc, ParsedType LhsTy, Expr *DimExpr, SourceLocation RParen)
ActOnArrayTypeTrait - Parsed one of the binary type trait support pseudo-functions.
Decl * ActOnFileScopeAsmDecl(Expr *expr, SourceLocation AsmLoc, SourceLocation RParenLoc)
QualType CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversion, bool AllowBoolOperation, bool ReportInvalid)
type checking for vector binary operators.
bool checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, SmallVectorImpl< StringRef > &Strings)
An RAII helper that pops function a function scope on exit.
NamedDecl * LookupSingleName(Scope *S, DeclarationName Name, SourceLocation Loc, LookupNameKind NameKind, RedeclarationKind Redecl=NotForRedeclaration)
Look up a name, looking for a single declaration.
LocalInstantiationScope * CurrentInstantiationScope
The current instantiation scope used to store local variables.
void DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName=false)
static NameClassification Unknown()
sema::FunctionScopeInfo * getCurFunctionAvailabilityContext()
Retrieve the current function, if any, that should be analyzed for potential availability violations.
ObjCMethodDecl * getCurMethodDecl()
getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the meth...
void PrintStats() const
Print out statistics about the semantic analysis.
OMPClause * ActOnOpenMPProcBindClause(llvm::omp::ProcBindKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'proc_bind' clause.
AlignPackInfo(AlignPackInfo::Mode M, bool IsXL)
Provides information about an attempted template argument deduction, whose success or failure was des...
FunctionDecl * CreateBuiltin(IdentifierInfo *II, QualType Type, unsigned ID, SourceLocation Loc)
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
Abstract interface for a module loader.
OMPClause * ActOnOpenMPMergeableClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'mergeable' clause.
ExprResult BuildSourceLocExpr(SourceLocExpr::IdentKind Kind, SourceLocation BuiltinLoc, SourceLocation RPLoc, DeclContext *ParentContext)
QualType BuildDecltypeType(Expr *E, bool AsUnevaluated=true)
If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building...
StmtResult ActOnOpenMPMaskedDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp masked' after parsing of the.
SourceRange getExprRange(Expr *E) const
One of these records is kept for each identifier that is lexed.
ExprResult DefaultVariadicArgumentPromotion(Expr *E, VariadicCallType CT, FunctionDecl *FDecl)
DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but will create a trap if the resul...
QualType BuildBitIntType(bool IsUnsigned, Expr *BitWidth, SourceLocation Loc)
Build a bit-precise integer type.
void CodeCompleteObjCInterfaceDecl(Scope *S)
LoopUnrollHintAttr * BuildLoopUnrollHintAttr(const AttributeCommonInfo &A, Expr *E)
void addImplicitTypedef(StringRef Name, QualType T)
@ NC_UndeclaredTemplate
The name was classified as an ADL-only function template name.
bool areMultiversionVariantFunctionsCompatible(const FunctionDecl *OldFD, const FunctionDecl *NewFD, const PartialDiagnostic &NoProtoDiagID, const PartialDiagnosticAt &NoteCausedDiagIDAt, const PartialDiagnosticAt &NoSupportDiagIDAt, const PartialDiagnosticAt &DiffDiagIDAt, bool TemplatesSupported, bool ConstexprSupported, bool CLinkageMayDiffer)
Checks if the variant/multiversion functions are compatible.
IdentifierInfo * DeclIdent
TemplateNameKindForDiagnostics getTemplateNameKindForDiagnostics(TemplateName Name)
bool DiagnoseUnusedLambdaCapture(SourceRange CaptureRange, const sema::Capture &From)
Diagnose if an explicit lambda capture is unused.
ModuleLoader & getModuleLoader() const
Retrieve the module loader associated with the preprocessor.
ExprResult CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool RequiresADL=true, bool AllowRewrittenCandidates=true, FunctionDecl *DefaultedFn=nullptr)
Create a binary operation that may resolve to an overloaded operator.
bool isModuleVisible(const Module *M, bool ModulePrivate=false)
void ActOnStartOfTranslationUnit()
This is called before the very first declaration in the translation unit is parsed.
AssignConvertType CheckAssignmentConstraints(SourceLocation Loc, QualType LHSType, QualType RHSType)
CheckAssignmentConstraints - Perform type checking for assignment, argument passing,...
DeclContext * getFunctionLevelDeclContext(bool AllowLambda=false)
If AllowLambda is true, treat lambda as function.
bool mightBeIntendedToBeTemplateName(ExprResult E, bool &Dependent)
Determine whether it's plausible that E was intended to be a template-name.
SourceLocation ImplicitMSInheritanceAttrLoc
Source location for newly created implicit MSInheritanceAttrs.
StmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc, Stmt *Try, MultiStmtArg Catch, Stmt *Finally)
Represents the declaration of a typedef-name via the 'typedef' type specifier.
EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext=Sema::ExpressionEvaluationContextRecord::EK_Other, bool ShouldEnter=true)
void AddTemplateConversionCandidate(FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit, bool AllowExplicit, bool AllowResultConversion=true)
Adds a conversion function template specialization candidate to the overload set, using template argu...
llvm::MapVector< Selector, SourceLocation > ReferencedSelectors
Method selectors used in a @selector expression.
OMPClause * ActOnOpenMPAlignClause(Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'align' clause.
bool CheckConstraintSatisfaction(const NamedDecl *Template, ArrayRef< const Expr * > ConstraintExprs, ArrayRef< TemplateArgument > TemplateArgs, SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction)
Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given...
@ NC_Concept
The name was classified as a concept name.
static OpaquePtr make(QualType P)
void CheckMain(FunctionDecl *FD, const DeclSpec &D)
bool isThisOutsideMemberFunctionBody(QualType BaseType)
Determine whether the given type is the type of *this that is used outside of the body of a member fu...
ExprResult checkUnknownAnyArg(SourceLocation callLoc, Expr *result, QualType ¶mType)
Type-check an expression that's being passed to an __unknown_anytype parameter.
NamespaceDecl * lookupStdExperimentalNamespace()
bool InstantiateEnum(SourceLocation PointOfInstantiation, EnumDecl *Instantiation, EnumDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
Instantiate the definition of an enum from a given pattern.
bool isNonTypeNestedNameSpecifier(Scope *S, CXXScopeSpec &SS, NestedNameSpecInfo &IdInfo)
OMPClause * ActOnOpenMPAlignedClause(ArrayRef< Expr * > VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'aligned' clause.
UuidAttr * mergeUuidAttr(Decl *D, const AttributeCommonInfo &CI, StringRef UuidAsWritten, MSGuidDecl *GuidDecl)
SYCLAddIRAttributesFunctionAttr * MergeSYCLAddIRAttributesFunctionAttr(Decl *D, const SYCLAddIRAttributesFunctionAttr &A)
SpecialMemberOverloadResultEntry(const llvm::FoldingSetNodeID &ID)
@ CheckValid
Identify whether this function satisfies the formal rules for constexpr functions in the current lanu...
void AddSYCLIntelMaxGlobalWorkDimAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
ObjCInterfaceDecl * NSDictionaryDecl
The declaration of the Objective-C NSDictionary class.
void DiagnoseUnterminatedPragmaAlignPack()
bool CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New)
void addLambdaParameters(ArrayRef< LambdaIntroducer::LambdaCapture > Captures, CXXMethodDecl *CallOperator, Scope *CurScope)
Introduce the lambda parameters into scope.
bool CheckRebuiltAttributedStmtAttributes(ArrayRef< const Attr * > Attrs)
unsigned getDiagID() const
void MarkDeclRefReferenced(DeclRefExpr *E, const Expr *Base=nullptr)
Perform reference-marking and odr-use handling for a DeclRefExpr.
ExprResult BuildSYCLBuiltinNumBasesExpr(SourceLocation Loc, QualType SourceTy)
ObjCTypeParamList * actOnObjCTypeParamList(Scope *S, SourceLocation lAngleLoc, ArrayRef< Decl * > typeParams, SourceLocation rAngleLoc)
bool CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg)
Check a template argument against its corresponding template template parameter.
bool BuildTypeConstraint(const CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc, bool AllowUnexpandedPack)
ExprResult ActOnOMPIteratorExpr(Scope *S, SourceLocation IteratorKwLoc, SourceLocation LLoc, SourceLocation RLoc, ArrayRef< OMPIteratorData > Data)
void ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(Decl *D)
Act on D, a function definition inside of an omp [begin/end] assumes.
unsigned getTemplateDepth(Scope *S) const
Determine the number of levels of enclosing template parameters.
virtual void anchor()
This virtual key function only exists to limit the emission of debug info describing the Sema class.
DeclGroupPtrTy BuildDeclaratorGroup(MutableArrayRef< Decl * > Group)
BuildDeclaratorGroup - convert a list of declarations into a declaration group, performing any necess...
ParsedType getDestructorTypeForDecltype(const DeclSpec &DS, ParsedType ObjectType)
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
void tryCaptureOpenMPLambdas(ValueDecl *V)
Function tries to capture lambda's captured variables in the OpenMP region before the original lambda...
ExprResult ActOnCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, SourceLocation LAngleBracketLoc, Declarator &D, SourceLocation RAngleBracketLoc, SourceLocation LParenLoc, Expr *E, SourceLocation RParenLoc)
ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const,addrspace}_cast's.
A stack object to be created when performing template instantiation.
@ PartitionImplementation
'module X:Y;'
ExprResult BuildPossibleImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, UnresolvedLookupExpr *AsULE=nullptr)
Builds an expression which might be an implicit member expression.
QualType InvalidOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
the following "Check" methods will return a valid/converted QualType or a null QualType (indicating a...
VarArgKind isValidVarArgType(const QualType &Ty)
Determine the degree of POD-ness for an expression.
SemaDiagnosticBuilder(Kind K, SourceLocation Loc, unsigned DiagID, FunctionDecl *Fn, Sema &S, DeviceDiagnosticReason R)
ExprResult CreateUnaryExprOrTypeTraitExpr(TypeSourceInfo *TInfo, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R)
Build a sizeof or alignof expression given a type operand.
llvm::SmallVector< QualType, 4 > CurrentParameterCopyTypes
Stack of types that correspond to the parameter entities that are currently being copy-initialized.
void SetIvarInitializers(ObjCImplementationDecl *ObjCImplementation)
SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whos...
PartialDiagnosticAt & getDiag()
@ ConstraintNormalization
Expr * MaybeCreateExprWithCleanups(Expr *SubExpr)
MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups,...
@ UPPC_BitFieldWidth
The size of a bit-field.
A generic diagnostic builder for errors which may or may not be deferred.
void DiagnoseMisalignedMembers()
Diagnoses the current set of gathered accesses.
OMPClause * ActOnOpenMPFirstprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'firstprivate' clause.
Represents the declaration of an Objective-C type parameter.
void propagateDLLAttrToBaseClassTemplate(CXXRecordDecl *Class, Attr *ClassAttr, ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc)
Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibi...
void RecordParsingTemplateParameterDepth(unsigned Depth)
This is used to inform Sema what the current TemplateParameterDepth is during Parsing.
bool CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsMemberSpecialization)
Perform semantic checking of a new function declaration.
Decl * ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef< Decl * > allMethods=None, ArrayRef< DeclGroupPtrTy > allTUVars=None)
Describes the kind of initialization being performed, along with location information for tokens rela...
ExprResult BuildAsTypeExpr(Expr *E, QualType DestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
Create a new AsTypeExpr node (bitcast) from the arguments.
ObjCInterfaceDecl * getObjCInterfaceDecl(IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false)
Look for an Objective-C class in the translation unit.
ParsedTemplateArgument ActOnPackExpansion(const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc)
Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion.
VarDecl * BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id)
Perform semantic analysis for the variable declaration that occurs within a C++ catch clause,...
RequiredTemplateKind(TemplateNameIsRequiredTag)
Template name is unconditionally required.
QualType getMessageSendResultType(const Expr *Receiver, QualType ReceiverType, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage)
Determine the result of a message send expression based on the type of the receiver,...
@ DeclaringImplicitEqualityComparison
We are declaring an implicit 'operator==' for a defaulted 'operator<=>'.
LabelDecl * GetOrCreateMSAsmLabel(StringRef ExternalLabelName, SourceLocation Location, bool AlwaysCreate)
ExceptionSpecificationType Type
The kind of exception specification this is.
void checkSYCLDeviceVarDecl(VarDecl *Var)
CleanupInfo Cleanup
Used to control the generation of ExprWithCleanups.
StmtResult ActOnOpenMPTargetParallelDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target parallel' after parsing of the associated statement.
Preprocessor & getPreprocessor() const
Reads an AST files chain containing the contents of a translation unit.
RecordDecl * CreateCapturedStmtRecordDecl(CapturedDecl *&CD, SourceLocation Loc, unsigned NumParams)
sema::DelayedDiagnosticPool * getCurrentPool() const
Returns the current delayed-diagnostics pool.
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
ReferenceConversions
The conversions that would be performed on an lvalue of type T2 when binding a reference of type T1 t...
void MarkFunctionParmPackReferenced(FunctionParmPackExpr *E)
Perform reference-marking and odr-use handling for a FunctionParmPackExpr.
FunctionEmissionStatus getEmissionStatus(FunctionDecl *Decl, bool Final=false)
CallingConventionIgnoredReason
Describes the reason a calling convention specification was ignored, used for diagnostics.
@ OmpDevice
OpenMP specific diagnostic.
ExprResult ActOnConstantExpression(ExprResult Res)
Represents the this expression in C++.
@ ConstantEvaluated
The current context is "potentially evaluated" in C++11 terms, but the expression is evaluated at com...
@ All
Allow both explicit conversion functions and explicit constructors.
void CodeCompleteAvailabilityPlatformName()
@ UPPC_StaticAssertExpression
The expression in a static assertion.
void collectUnexpandedParameterPacks(TemplateArgument Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
Collect the set of unexpanded parameter packs within the given template argument.
NamedDecl * ActOnTemplateTemplateParameter(Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument DefaultArg)
ActOnTemplateTemplateParameter - Called when a C++ template template parameter (e....
bool CollectMultipleMethodsInGlobalPool(Selector Sel, SmallVectorImpl< ObjCMethodDecl * > &Methods, bool InstanceFirst, bool CheckTheOther, const ObjCObjectType *TypeBound=nullptr)
We first select the type of the method: Instance or Factory, then collect all methods with that type.
UnresolvedSetIterator getMostSpecialized(UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd, TemplateSpecCandidateSet &FailedCandidates, SourceLocation Loc, const PartialDiagnostic &NoneDiag, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag, bool Complain=true, QualType TargetType=QualType())
Retrieve the most specialized of the given function template specializations.
bool CheckConstexprFunctionDefinition(const FunctionDecl *FD, CheckConstexprKind Kind)
ParsedType getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectType, bool EnteringContext)
@ ImportAllowed
after 'module X;' but before any non-import decl.
@ PCC_Statement
Code completion occurs within a statement, which may also be an expression or a declaration.
ExprResult ActOnConvertVectorExpr(Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
__builtin_convertvector(...)
SemaDiagnosticBuilder targetDiag(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD=nullptr)
TranslationUnitKind
Describes the kind of translation unit being processed.
OverloadKind
C++ Overloading.
llvm::DenseMap< int, SourceRange > ParsedSubjectMatchRuleSet
@ ExceptionSpecEvaluation
We are computing the exception specification for a defaulted special member function.
void CodeCompleteObjCSuperMessage(Scope *S, SourceLocation SuperLoc, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression)
SemaDiagnosticBuilder diagnoseNoMatch(Sema &S, SourceLocation Loc, QualType T) override
Emits a diagnostic complaining that the expression does not have integral or enumeration type.
ObjCMethodDecl - Represents an instance or class method declaration.
@ ObjCClassMessage
The message is a class message, and the identifier is a type name.
ExtVectorDeclsType ExtVectorDecls
ExtVectorDecls - This is a list all the extended vector types.
bool isImmediateFunctionContext() const
IfStatementKind
In an if statement, this denotes whether the the statement is a constexpr or consteval if statement.
void ActOnPragmaClangSection(SourceLocation PragmaLoc, PragmaClangSectionAction Action, PragmaClangSectionKind SecKind, StringRef SecName)
ActOnPragmaClangSection - Called on well formed #pragma clang section.
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
llvm::DenseMap< IdentifierInfo *, SrcLocSet > IdentifierSourceLocations
bool isUnconditionallyVisible() const
Determine whether this declaration is definitely visible to name lookup, independent of whether the o...
bool CheckParmsForFunctionDef(ArrayRef< ParmVarDecl * > Parameters, bool CheckParameterNames)
Helpers for dealing with blocks and functions.
llvm::SetVector< Expr *, SmallVector< Expr *, 4 >, llvm::SmallPtrSet< Expr *, 4 > > MaybeODRUseExprSet
Store a set of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) t...
bool isActive() const
Determine whether this diagnostic is still active.
@ AP_InferredFromOtherPlatform
The availability attribute for a specific platform was inferred from an availability attribute for an...
void CheckStaticLocalForDllExport(VarDecl *VD)
Check if VD needs to be dllexport/dllimport due to being in a dllexport/import function.
Decl * D
The template function declaration to be late parsed.
void ActOnModuleEnd(SourceLocation DirectiveLoc, Module *Mod)
The parser has left a submodule.
NullabilityKind
Describes the nullability of a particular type.
ExprResult LookupInObjCMethod(LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false)
The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
bool InDiscardedStatement
static FormatStringType GetFormatStringType(const FormatAttr *Format)
StmtResult ActOnStartOfSwitchStmt(SourceLocation SwitchLoc, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc)
StmtResult ActOnOpenMPTeamsGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams loop' after parsing of the associated statement.
void emitAndClearUnusedLocalTypedefWarnings()
StmtResult ActOnOpenMPCanonicalLoop(Stmt *AStmt)
Called for syntactical loops (ForStmt or CXXForRangeStmt) associated to an OpenMP loop directive.
DefaultedFunctionKind(CXXSpecialMember CSM)
void finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc)
Finishes analysis of the deferred functions calls that may be declared as host/nohost during device/h...
StmtResult ActOnOpenMPTargetExitDataDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target exit data' after parsing of the associated statement.
bool CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, bool IsFixed, const EnumDecl *Prev)
Check whether this is a valid redeclaration of a previous enumeration.
OMPClause * ActOnOpenMPBindClause(OpenMPBindClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on a well-formed 'bind' clause.
StmtResult ActOnSEHTryBlock(bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler)
bool SavedInNonInstantiationSFINAEContext
Was the enclosing context a non-instantiation SFINAE context?
QualType CXXThisTypeOverride
When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-stati...
ActionResult< Stmt * > StmtResult
@ AFS_Both
Look for allocation functions in both the global scope and in the scope of the allocated class.
DeviceDiagnosticReason getReason() const
AccessResult CheckDestructorAccess(SourceLocation Loc, CXXDestructorDecl *Dtor, const PartialDiagnostic &PDiag, QualType objectType=QualType())
StmtResult ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *First, ConditionResult Second, FullExprArg Third, SourceLocation RParenLoc, Stmt *Body)
@ NC_Keyword
The name has been typo-corrected to a keyword.
void PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc)
PopPragmaVisibility - Pop the top element of the visibility stack; used for '#pragma GCC visibility' ...
Scope * getCurScope() const
Retrieve the parser's current scope.
void WarnExactTypedMethods(ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
WarnExactTypedMethods - This routine issues a warning if method implementation declaration matches ex...
bool This(InterpState &S, CodePtr OpPC)
void ActOnAfterCompoundStatementLeadingPragmas()
Decl * BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS, RecordDecl *Record)
BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure.
A dependently-generated diagnostic.
void CheckUnusedVolatileAssignment(Expr *E)
Check whether E, which is either a discarded-value expression or an unevaluated operand,...
QualType BuildVectorType(QualType T, Expr *VecSize, SourceLocation AttrLoc)
bool InNonInstantiationSFINAEContext
Whether we are in a SFINAE context that is not associated with template instantiation.
bool ActOnSuperScopeSpecifier(SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS)
The parser has parsed a '__super' nested-name-specifier.
@ UPPC_FriendDeclaration
A friend declaration.
WebAssemblyImportNameAttr * mergeImportNameAttr(Decl *D, const WebAssemblyImportNameAttr &AL)
NullPointerConstantKind
Enumeration used to describe the kind of Null pointer constant returned from isNullPointerConstant().
StmtResult ActOnOpenMPSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp simd' after parsing of the associated statement.
bool DiagnoseUnknownTemplateName(const IdentifierInfo &II, SourceLocation IILoc, Scope *S, const CXXScopeSpec *SS, TemplateTy &SuggestedTemplate, TemplateNameKind &SuggestedKind)
void DefineImplicitLambdaToBlockPointerConversion(SourceLocation CurrentLoc, CXXConversionDecl *Conv)
Define the "body" of the conversion from a lambda object to a block pointer.
SourceLocation PointerEndLoc
The end location for the first pointer declarator in the file.
void AddSYCLIntelNoGlobalWorkOffsetAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
AssignConvertType CheckSingleAssignmentConstraints(QualType LHSType, ExprResult &RHS, bool Diagnose=true, bool DiagnoseCFAudited=false, bool ConvertRHS=true)
Check assignment constraints for an assignment of RHS to LHSType.
@ InitializingStructuredBinding
We are initializing a structured binding.
bool CheckCallingConvAttr(const ParsedAttr &attr, CallingConv &CC, const FunctionDecl *FD=nullptr)
void LookupNecessaryTypesForBuiltin(Scope *S, unsigned ID)
PragmaStack< StringLiteral * > ConstSegStack
bool isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S=nullptr, bool AllowInlineNamespace=false)
isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S',...
ParmVarDecl * CheckParameter(DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC)
llvm::DenseMap< ParmVarDecl *, SourceLocation > UnparsedDefaultArgLocs
Extra information about a function prototype.
Represents a path from a specific derived class (which is not represented as part of the path) to a p...
bool FormatStringHasSArg(const StringLiteral *FExpr)
OMPClause * ActOnOpenMPNumTeamsClause(Expr *NumTeams, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_teams' clause.
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
void CodeCompleteObjCAtExpression(Scope *S)
A pair of a canonical FunctionDecl and a SourceLocation.
bool DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=None, TypoExpr **Out=nullptr)
Diagnose an empty lookup.
void NoteOverloadCandidate(NamedDecl *Found, FunctionDecl *Fn, OverloadCandidateRewriteKind RewriteKind=OverloadCandidateRewriteKind(), QualType DestType=QualType(), bool TakingAddress=false)
PragmaMSPointersToMembersKind
void diagnoseNullResettableSynthesizedSetters(const ObjCImplDecl *impDecl)
Diagnose any null-resettable synthesized setters.
void CheckCompleteVariableDeclaration(VarDecl *VD)
bool isKnownGoodSYCLDecl(const Decl *D)
bool hasGlobalOpenMPAssumes() const
Check if there is an active global omp assumes directive.
std::string SYCLIntFooter
SYCL integration footer to be generated by the device compiler.
bool usesPartialOrExplicitSpecialization(SourceLocation Loc, ClassTemplateSpecializationDecl *ClassTemplateSpec)
CompoundScopeRAII(Sema &S, bool IsStmtExpr=false)
ExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc, tok::TokenKind Op, Expr *Input)
@ LookupNestedNameSpecifierName
Look up of a name that precedes the '::' scope resolution operator in C++.
void MarkDeducedTemplateParameters(const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
const ValueDecl * getOpenMPDeclareMapperVarName() const
ExceptionSpecificationType getExceptionSpecType() const
Get the computed exception specification type.
void ProcessDeclAttributes(Scope *S, Decl *D, const Declarator &PD)
QualType CheckLogicalOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
void EndOpenMPClause()
End analysis of clauses.
void DiagnoseAbsenceOfOverrideControl(NamedDecl *D, bool Inconsistent)
DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was not used in the declaration of ...
void mergeDeclAttributes(NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AMK_Redeclaration)
mergeDeclAttributes - Copy attributes from the Old decl to the New one.
void PushFunctionScope()
Enter a new function scope.
ExprResult CreateRecoveryExpr(SourceLocation Begin, SourceLocation End, ArrayRef< Expr * > SubExprs, QualType T=QualType())
Attempts to produce a RecoveryExpr after some AST node cannot be created.
QualType ProduceCtorInitMemberSignatureHelp(Decl *ConstructorDecl, CXXScopeSpec SS, ParsedType TemplateTypeTy, ArrayRef< Expr * > ArgExprs, IdentifierInfo *II, SourceLocation OpenParLoc, bool Braced)
Represents a field injected from an anonymous union/struct into the parent scope.
ObjCMethodDecl * DictionaryWithObjectsMethod
The declaration of the dictionaryWithObjects:forKeys:count: method.
void mergeObjCMethodDecls(ObjCMethodDecl *New, ObjCMethodDecl *Old)
ExprResult PerformMemberExprBaseConversion(Expr *Base, bool IsArrow)
Perform conversions on the LHS of a member access expression.
bool DiagIfReachable(SourceLocation Loc, ArrayRef< const Stmt * > Stmts, const PartialDiagnostic &PD)
Conditionally issue a diagnostic based on the statements's reachability analysis.
void inferGslPointerAttribute(NamedDecl *ND, CXXRecordDecl *UnderlyingRecord)
Add gsl::Pointer attribute to std::container::iterator.
llvm::SmallVector< std::pair< SourceLocation, const BlockDecl * >, 1 > ImplicitlyRetainedSelfLocs
List of SourceLocations where 'self' is implicitly retained inside a block.
bool isConstantEvaluatedOverride
Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextReco...
@ ObjCInstanceMessage
The message is an instance message.
QualType CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, TypeSourceInfo **TSI, bool DeducedTSTContext)
@ NC_UndeclaredNonType
The name was classified as an ADL-only function name.
Smart pointer class that efficiently represents Objective-C method names.
@ TDK_IncompletePack
Template argument deduction did not deduce a value for every expansion of an expanded template parame...
Contains information about the compound statement currently being parsed.
@ TDK_CUDATargetMismatch
CUDA Target attributes do not match.
bool checkVarDeclRedefinition(VarDecl *OldDefn, VarDecl *NewDefn)
We've just determined that Old and New both appear to be definitions of the same variable.
ExprResult CheckConvertedConstantExpression(Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE)
CXXConstructorDecl * DeclareImplicitCopyConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit copy constructor for the given class.
void ActOnStartOfCompoundStmt(bool IsStmtExpr)
bool CheckAttrTarget(const ParsedAttr &CurrAttr)
bool SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef< CXXCtorInitializer * > Initializers=None)
QualType ExtractUnqualifiedFunctionType(QualType PossiblyAFunctionType)
llvm::SmallPtrSet< SpecialMemberDecl, 4 > SpecialMembersBeingDeclared
The C++ special members which we are currently in the process of declaring.
void ActOnPragmaDump(Scope *S, SourceLocation Loc, IdentifierInfo *II)
Called on #pragma clang __debug dump II.
StmtResult ActOnWhileStmt(SourceLocation WhileLoc, SourceLocation LParenLoc, ConditionResult Cond, SourceLocation RParenLoc, Stmt *Body)
void ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange, Decl *EnumDecl, ArrayRef< Decl * > Elements, Scope *S, const ParsedAttributesView &Attr)
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
ActionResult< ParsedType > TypeResult
ConditionResult ActOnConditionVariable(Decl *ConditionVar, SourceLocation StmtLoc, ConditionKind CK)
void DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl)
DiagnoseTemplateParameterShadow - Produce a diagnostic complaining that the template parameter 'PrevD...
SkippedDefinitionContext ActOnTagStartSkippedDefinition(Scope *S, Decl *TD)
Invoked when we enter a tag definition that we're skipping.
AllocationFunctionScope
The scope in which to find allocation functions.
@ MoveEligibleAndCopyElidable
TPOC
The context in which partial ordering of function templates occurs.
Abstract base class used for diagnosing integer constant expression violations.
bool checkCommonAttributeFeatures(const Decl *D, const ParsedAttr &A, bool SkipArgCountCheck=false)
Handles semantic checking for features that are common to all attributes, such as checking whether a ...
bool hasVisibleExplicitSpecialization(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if there is a visible declaration of D that is an explicit specialization declaration for a...
void ActOnDocumentableDecl(Decl *D)
Should be called on all declarations that might have attached documentation comments.
StmtResult ActOnOpenMPForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp for simd' after parsing of the associated statement.
IntelReqdSubGroupSizeAttr * MergeIntelReqdSubGroupSizeAttr(Decl *D, const IntelReqdSubGroupSizeAttr &A)
bool ActOnDuplicateDefinition(DeclSpec &DS, Decl *Prev, SkipBodyInfo &SkipBody)
Perform ODR-like check for C/ObjC when merging tag types from modules.
VarDecl * createLambdaInitCaptureVarDecl(SourceLocation Loc, QualType InitCaptureType, SourceLocation EllipsisLoc, IdentifierInfo *Id, unsigned InitStyle, Expr *Init)
Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purpose...
void AddIntelFPGANumBanksAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
LabelDecl * LookupOrCreateLabel(IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation())
LookupOrCreateLabel - Do a name lookup of a label with the specified name.
QualType CheckConstructorDeclarator(Declarator &D, QualType R, StorageClass &SC)
CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructo...
unsigned getPackNumber() const
void ReadMethodPool(Selector Sel)
Read the contents of the method pool for a given selector from external storage.
Designation - Represent a full designation, which is a sequence of designators.
Stmt - This represents one statement.
void enterTypeCast(SourceLocation Tok, QualType CastType)
Handles all type casts, including C-style cast, C++ casts, etc.
@ EST_BasicNoexcept
noexcept
void DiagnoseDeletedDefaultedFunction(FunctionDecl *FD)
Produce notes explaining why a defaulted function was defined as deleted.
StmtResult BuildIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
ExprResult ParseObjCProtocolExpression(IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc)
ParseObjCProtocolExpression - Build protocol expression for @protocol.
ObjCIvarDecl - Represents an ObjC instance variable.
bool hasExplicitCallingConv(QualType T)
@ NonDefaultStateAtInclude
void RegisterLocallyScopedExternCDecl(NamedDecl *ND, Scope *S)
Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarat...
OMPClause * ActOnOpenMPFinalClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'final' clause.
ObjCMessageKind getObjCMessageKind(Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType)
Scope * getScopeForContext(DeclContext *Ctx)
Determines the active Scope associated with the given declaration context.
@ Incompatible
Incompatible - We reject this conversion outright, it is invalid to represent it in the AST.
InternalLinkageAttr * mergeInternalLinkageAttr(Decl *D, const ParsedAttr &AL)
@ TPL_TemplateTemplateArgumentMatch
We are matching the template parameter lists of a template template argument against the template par...
StmtResult ActOnMSDependentExistsStmt(SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name, Stmt *Nested)
OMPIteratorExpr::IteratorRange Range
bool CompleteConstructorCall(CXXConstructorDecl *Constructor, QualType DeclInitType, MultiExprArg ArgsPtr, SourceLocation Loc, SmallVectorImpl< Expr * > &ConvertedArgs, bool AllowExplicit=false, bool IsListInitialization=false)
Given a constructor and the set of arguments provided for the constructor, convert the arguments and ...
AccessResult CheckUnresolvedLookupAccess(UnresolvedLookupExpr *E, DeclAccessPair FoundDecl)
void AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(FunctionDecl *FD)
If this function is a C++ replaceable global allocation function (C++2a [basic.stc....
A derivative of BoundTypeDiagnoser for which the diagnostic's type parameter is preceded by a 0/1 enu...
bool isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New)
ExplicitSpecifier ActOnExplicitBoolSpecifier(Expr *E)
ActOnExplicitBoolSpecifier - Build an ExplicitSpecifier from an expression found in an explicit(bool)...
CXXMethodDecl * LookupMovingAssignment(CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
Look up the moving assignment operator for the given class.
void buildLambdaScope(sema::LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, bool ExplicitParams, bool ExplicitResultType, bool Mutable)
Endow the lambda scope info with the relevant properties.
An instance of this class represents the declaration of a property member.
QualType adjustCCAndNoReturn(QualType ArgFunctionType, QualType FunctionType, bool AdjustExceptionSpec=false)
Adjust the type ArgFunctionType to match the calling convention, noreturn, and optionally the excepti...
bool SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH=TAH_IgnoreTrivialABI, bool Diagnose=false)
Determine whether a defaulted or deleted special member function is trivial, as specified in C++11 [c...
SourceLocation PragmaLocation
Decl * ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &AttrList)
@ IER_Exists
The symbol exists.
CodeCompleteConsumer * CodeCompleter
Code-completion consumer.
StmtResult ActOnOpenMPParallelGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel loop' after parsing of the associated statement.
bool isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level, unsigned OpenMPCaptureLevel) const
Return true if the provided declaration VD should be captured by reference.
ExprResult BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
Information about one declarator, including the parsed type information and the identifier.
void AddOptnoneAttributeIfNoConflicts(FunctionDecl *FD, SourceLocation Loc)
Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents th...
bool CheckEnumUnderlyingType(TypeSourceInfo *TI)
Check that this is a valid underlying type for an enum declaration.
void translateTemplateArguments(const ASTTemplateArgsPtr &In, TemplateArgumentListInfo &Out)
Translates template arguments as provided by the parser into template arguments used by semantic anal...
NamedDecl * ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams)
void threadSafetyCleanup(BeforeSet *Cache)
void AddOverloadCandidate(FunctionDecl *Function, DeclAccessPair FoundDecl, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=true, bool AllowExplicitConversion=false, ADLCallKind IsADLCandidate=ADLCallKind::NotADL, ConversionSequenceList EarlyConversions=None, OverloadCandidateParamOrder PO={})
AddOverloadCandidate - Adds the given function to the set of candidate functions, using the given fun...
static uint32_t getRawEncoding(const AlignPackInfo &Info)
Data structure used to record current or nested expression evaluation contexts.
void handleLambdaNumbering(CXXRecordDecl *Class, CXXMethodDecl *Method, Optional< std::tuple< bool, unsigned, unsigned, Decl * >> Mangling=None)
Number lambda for linkage purposes if necessary.
PragmaClangSectionKind
pragma clang section kind
SourceLocation CCLoc
The location of the '::'.
VarTemplateSpecializationDecl * CompleteVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiates a variable template specialization by completing it with appropriate type information an...
StmtResult ActOnOpenMPMasterDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp master' after parsing of the associated statement.
@ CopyInit
[a = b], [a = {b}]
StmtResult ActOnForEachLValueExpr(Expr *E)
In an Objective C collection iteration statement: for (x in y) x can be an arbitrary l-value expressi...
OpenMPScheduleClauseModifier
OpenMP modifiers for 'schedule' clause.
virtual SemaDiagnosticBuilder diagnoseNotICE(Sema &S, SourceLocation Loc)=0
void diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E)
Warn when implicitly casting 0 to nullptr.
bool isMoveEligible() const
StmtResult ActOnDefaultStmt(SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt, Scope *CurScope)
OMPClause * ActOnOpenMPSeqCstClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'seq_cst' clause.
TypeSourceInfo * ReplaceAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto, QualType Replacement)
bool isValidPointerAttrType(QualType T, bool RefOkay=false)
Determine if type T is a valid subject for a nonnull and similar attributes.
CUDAFunctionPreference IdentifyCUDAPreference(const FunctionDecl *Caller, const FunctionDecl *Callee)
Identifies relative preference of a given Caller/Callee combination, based on their host/device attri...
ExprResult BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc)
void DiagnoseTypeArgsAndProtocols(IdentifierInfo *ProtocolId, SourceLocation ProtocolLoc, IdentifierInfo *TypeArgId, SourceLocation TypeArgLoc, bool SelectProtocolFirst=false)
ExprResult BuildCXXMemberCallExpr(Expr *Exp, NamedDecl *FoundDecl, CXXConversionDecl *Method, bool HadMultipleCandidates)
Decl * ActOnStartNamespaceDef(Scope *S, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *Ident, SourceLocation LBrace, const ParsedAttributesView &AttrList, UsingDirectiveDecl *&UsingDecl)
ActOnStartNamespaceDef - This is called at the start of a namespace definition.
Attr * getImplicitCodeSegOrSectionAttrForFunction(const FunctionDecl *FD, bool IsDefinition)
Returns an implicit CodeSegAttr if a __declspec(code_seg) is found on a containing class.
bool CanUseDecl(NamedDecl *D, bool TreatUnavailableAsInvalid)
Determine whether the use of this declaration is valid, without emitting diagnostics.
OMPClause * ActOnOpenMPClause(OpenMPClauseKind Kind, SourceLocation StartLoc, SourceLocation EndLoc)
ExprResult ActOnCXXThrow(Scope *S, SourceLocation OpLoc, Expr *expr)
ActOnCXXThrow - Parse throw expressions.
void StartOpenMPClause(OpenMPClauseKind K)
Start analysis of clauses.
void ActOnPragmaWeakAlias(IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.
Represents an Objective-C protocol declaration.
void EraseUnwantedCUDAMatches(const FunctionDecl *Caller, SmallVectorImpl< std::pair< DeclAccessPair, FunctionDecl * >> &Matches)
Finds a function in Matches with highest calling priority from Caller context and erases all function...
void MarkUsedTemplateParameters(const Expr *E, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
Mark which template parameters are used in a given expression.
This little struct is used to capture information about structure field declarators,...
CXXSpecialMember getSpecialMember(const CXXMethodDecl *MD)
bool isCompleteType(SourceLocation Loc, QualType T, CompleteTypeKind Kind=CompleteTypeKind::Default)
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
void ProcessPropertyDecl(ObjCPropertyDecl *property)
Process the specified property declaration and create decls for the setters and getters as needed.
void AddCFAuditedAttribute(Decl *D)
AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and,...
bool CaptureHasSideEffects(const sema::Capture &From)
Does copying/destroying the captured variable have side effects?
StmtResult ActOnOpenMPTargetUpdateDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target update'.
StmtResult ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, Scope *CurScope)
bool RequireCompleteSizedType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &... Args)
void CodeCompletePreprocessorMacroName(bool IsDefinition)
bool isValid() const
Return true if this is a valid SourceLocation object.
void enterDesignatedInitializer(SourceLocation Tok, QualType BaseType, const Designation &D)
Handles e.g. BaseType{ .D = Tok...
@ PCC_Template
Code completion occurs following one or more template headers.
Represents a base class of a C++ class.
ExprResult BuildUnresolvedCoawaitExpr(SourceLocation KwLoc, Expr *E, UnresolvedLookupExpr *Lookup)
Base class for callback objects used by Sema::CorrectTypo to check the validity of a potential typo c...
void RestoreNestedNameSpecifierAnnotation(void *Annotation, SourceRange AnnotationRange, CXXScopeSpec &SS)
Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure.
const AttributedType * getCallingConvAttributedType(QualType T) const
Get the outermost AttributedType node that sets a calling convention.
Decl * ActOnConceptDefinition(Scope *S, MultiTemplateParamsArg TemplateParameterLists, IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr)
static NameClassification Concept(TemplateName Name)
Attr - This represents one attribute.
brief A function argument from which we performed template argument
A container of type source information.
ExprResult ActOnIntegerConstant(SourceLocation Loc, uint64_t Val)
AvailabilityAttr * mergeAvailabilityAttr(NamedDecl *D, const AttributeCommonInfo &CI, IdentifierInfo *Platform, bool Implicit, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool IsStrict, StringRef Replacement, AvailabilityMergeKind AMK, int Priority)
Attribute merging methods. Return true if a new attribute was added.
A stack-allocated class that identifies which local variable declaration instantiations are present i...
bool SetMemberAccessSpecifier(NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS)
SetMemberAccessSpecifier - Set the access specifier of a member.
bool CheckOpenMPLinearDecl(const ValueDecl *D, SourceLocation ELoc, OpenMPLinearClauseKind LinKind, QualType Type, bool IsDeclareSimd=false)
Checks that the specified declaration matches requirements for the linear decls.
void ActOnOpenMPEndDeclareVariant()
Handle a omp end declare variant.
DeclContextLookupResult LookupConstructors(CXXRecordDecl *Class)
Look up the constructors for the given class.
void ActOnOpenMPDeclareReductionInitializerEnd(Decl *D, Expr *Initializer, VarDecl *OmpPrivParm)
Finish current declare reduction construct initializer.
@ UPPC_PartialSpecialization
Partial specialization.
DelegatingCtorDeclsType DelegatingCtorDecls
All the delegating constructors seen so far in the file, used for cycle detection at the end of the T...
SFINAETrap(Sema &SemaRef, bool AccessCheckingSFINAE=false)
llvm::MutableArrayRef< ImplicitConversionSequence > ConversionSequenceList
A list of implicit conversion sequences for the arguments of an OverloadCandidate.
This represents '#pragma omp requires...' directive.
NestedNameSpecifierLoc SubstNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS, const MultiLevelTemplateArgumentList &TemplateArgs)
void checkIllFormedTrivialABIStruct(CXXRecordDecl &RD)
Check that the C++ class annoated with "trivial_abi" satisfies all the conditions that are needed for...
NamedDecl * BuildUsingPackDecl(NamedDecl *InstantiatedFrom, ArrayRef< NamedDecl * > Expansions)
NamedDecl * lookupOpenMPDeclareTargetName(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id)
Searches for the provided declaration name for OpenMP declare target directive.
void FilterUsingLookup(Scope *S, LookupResult &lookup)
Remove decls we can't actually see from a lookup being used to declare shadow using decls.
SYCLIntelPipeIOAttr * MergeSYCLIntelPipeIOAttr(Decl *D, const SYCLIntelPipeIOAttr &A)
void ActOnFinishDelayedMemberDeclarations(Scope *S, Decl *Record)
void ActOnStartCXXInClassMemberInitializer()
Enter a new C++ default initializer scope.
void CodeCompleteObjCForCollection(Scope *S, DeclGroupPtrTy IterationVar)
void EvaluateImplicitExceptionSpec(SourceLocation Loc, FunctionDecl *FD)
Evaluate the implicit exception specification for a defaulted special member function.
void addSyclVarDecl(VarDecl *VD)
ExprResult ActOnCXXThis(SourceLocation loc)
MissingImportKind
Kinds of missing import.
StmtResult ActOnOpenMPDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute parallel for' after parsing of the associated statement...
void ActOnDefaultCtorInitializers(Decl *CDtorDecl)
TemplateNameIsRequiredTag
ExprResult ActOnParenExpr(SourceLocation L, SourceLocation R, Expr *E)
llvm::BumpPtrAllocator BumpAlloc
SmallVector< Expr *, 2 > VolatileAssignmentLHSs
Expressions appearing as the LHS of a volatile assignment in this context.
DelayedDiagnosticsState ParsingDeclState
OMPThreadPrivateDecl * CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef< Expr * > VarList)
Builds a new OpenMPThreadPrivateDecl and checks its correctness.
void SetDeclDeleted(Decl *dcl, SourceLocation DelLoc)
void ActOnTagStartDefinition(Scope *S, Decl *TagDecl)
ActOnTagStartDefinition - Invoked when we have entered the scope of a tag's definition (e....
SYCLIntelMaxWorkGroupSizeAttr * MergeSYCLIntelMaxWorkGroupSizeAttr(Decl *D, const SYCLIntelMaxWorkGroupSizeAttr &A)
ExprResult IgnoredValueConversions(Expr *E)
IgnoredValueConversions - Given that an expression's result is syntactically ignored,...
void DiagnoseCommaOperator(const Expr *LHS, SourceLocation Loc)
bool CheckFunctionConstraints(const FunctionDecl *FD, ConstraintSatisfaction &Satisfaction, SourceLocation UsageLoc=SourceLocation())
Check whether the given function decl's trailing requires clause is satisfied, if any.
bool isConstantEvaluated() const
ExprResult ActOnAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc, LabelDecl *TheDecl)
ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
void checkNonTrivialCUnion(QualType QT, SourceLocation Loc, NonTrivialCUnionContext UseContext, unsigned NonTrivialKind)
Emit diagnostics if a non-trivial C union type or a struct that contains a non-trivial C union is use...
static bool adjustContextForLocalExternDecl(DeclContext *&DC)
Adjust the DeclContext for a function or variable that might be a function-local external declaration...
NamedDecl * ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope)
ExprResult ActOnSYCLBuiltinBaseTypeExpr(ParsedType PT, Expr *Idx)
Get a value based on the type of the given base number so that callers can wrap it in a decltype() to...
bool isUsualDeallocationFunction(const CXXMethodDecl *FD)
@ Normal
Apply the normal rules for complete types.
ConditionResult ActOnCondition(Scope *S, SourceLocation Loc, Expr *SubExpr, ConditionKind CK, bool MissingOK=false)
@ UPPC_EnumeratorValue
The enumerator value.
LazyDeclPtr StdNamespace
The C++ "std" namespace, where the standard library resides.
StmtResult ActOnOpenMPTaskwaitDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskwait'.
void PushCompoundScope(bool IsStmtExpr)
void ForceDeclarationOfImplicitMembers(CXXRecordDecl *Class)
Force the declaration of any implicitly-declared members of this class.
ExprResult CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< TypeSourceInfo * > Types, ArrayRef< Expr * > Exprs)
NameClassificationKind
Describes the result of the name lookup and resolution performed by ClassifyName().
Optional< sema::TemplateDeductionInfo * > isSFINAEContext() const
Determines whether we are currently in a context where template argument substitution failures are no...
@ IncompatiblePointerDiscardsQualifiers
IncompatiblePointerDiscardsQualifiers - The assignment discards qualifiers that we don't permit to be...
void BuildModuleInclude(SourceLocation DirectiveLoc, Module *Mod)
StmtResult ActOnOpenMPTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp taskloop' after parsing of the associated statement.
bool LookupInSuper(LookupResult &R, CXXRecordDecl *Class)
Perform qualified name lookup into all base classes of the given class.
void CollectIvarsToConstructOrDestruct(ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars)
CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.
MSInheritanceModel
Assigned inheritance model for a class in the MS C++ ABI.
MemInitResult ActOnMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc, SourceLocation EllipsisLoc)
Handle a C++ member initializer using parentheses syntax.
Describes an entity that is being initialized.
ExprResult LookupInlineAsmVarDeclField(Expr *RefExpr, StringRef Member, SourceLocation AsmLoc)
OMPClause * ActOnOpenMPHintClause(Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'hint' clause.
void ActOnCapturedRegionStart(SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, unsigned NumParams)
SourceLocation OptimizeOffPragmaLocation
This represents the last location of a "#pragma clang optimize off" directive if such a directive has...
Decl * ActOnConversionDeclarator(CXXConversionDecl *Conversion)
ActOnConversionDeclarator - Called by ActOnDeclarator to complete the declaration of the given C++ co...
@ RewritingOperatorAsSpaceship
We are rewriting a comparison operator in terms of an operator<=>.
void ExitDeclaratorContext(Scope *S)
CXXThisScopeRAII(Sema &S, Decl *ContextDecl, Qualifiers CXXThisTypeQuals, bool Enabled=true)
Introduce a new scope where 'this' may be allowed (when enabled), using the given declaration (which ...
ExprResult BuildCXXNoexceptExpr(SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen)
SYCLAddIRAttributesKernelParameterAttr * MergeSYCLAddIRAttributesKernelParameterAttr(Decl *D, const SYCLAddIRAttributesKernelParameterAttr &A)
Base class for declarations which introduce a typedef-name.
TemplateParameterListEqualKind
Enumeration describing how template parameter lists are compared for equality.
@ UPPC_BaseType
The base type of a class type.
ExprResult BuildTemplateIdExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs)
PragmaStack< AlignPackInfo > AlignPackStack
An allocator used specifically for the purpose of code completion.
TypeSourceInfo * SubstType(TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, bool AllowDeducedTST=false)
Perform substitution on the type T with a given set of template arguments.
ExprResult ConvertParamDefaultArgument(ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
std::pair< Expr *, std::string > findFailedBooleanCondition(Expr *Cond)
Find the failed Boolean condition within a given Boolean constant expression, and describe it with a ...
SmallVector< LateInstantiatedAttribute, 16 > LateInstantiatedAttrVec
@ AMK_ProtocolImplementation
Merge availability attributes for an implementation of a protocol requirement.
void ActOnParamUnparsedDefaultArgument(Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc)
ActOnParamUnparsedDefaultArgument - We've seen a default argument for a function parameter,...
StmtResult FinishCXXForRangeStmt(Stmt *ForRange, Stmt *Body)
FinishCXXForRangeStmt - Attach the body to a C++0x for-range statement.
RequiresExprBodyDecl * ActOnStartRequiresExpr(SourceLocation RequiresKWLoc, ArrayRef< ParmVarDecl * > LocalParameters, Scope *BodyScope)
StmtResult ActOnOpenMPSingleDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp single' after parsing of the associated statement.
bool isObjCPointerConversion(QualType FromType, QualType ToType, QualType &ConvertedType, bool &IncompatibleObjC)
isObjCPointerConversion - Determines whether this is an Objective-C pointer conversion.
ObjCContainerDecl - Represents a container for method declarations.
bool isMemberAccessibleForDeletion(CXXRecordDecl *NamingClass, DeclAccessPair Found, QualType ObjectType, SourceLocation Loc, const PartialDiagnostic &Diag)
Is the given member accessible for the purposes of deciding whether to define a special member functi...
@ PrivateFragment
after 'module :private;'.
The results of name lookup within a DeclContext.
CUDAFunctionTarget CurrentCUDATarget()
Gets the CUDA target for the current context.
@ IncompatibleVectors
IncompatibleVectors - The assignment is between two vector types that have the same size,...
ExprResult CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
SYCLDeviceHasAttr * MergeSYCLDeviceHasAttr(Decl *D, const SYCLDeviceHasAttr &A)
std::string getCudaConfigureFuncName() const
Returns the name of the launch configuration function.
void CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *D)
@ TDK_Success
Template argument deduction was successful.
bool diagnoseArgDependentDiagnoseIfAttrs(const FunctionDecl *Function, const Expr *ThisArg, ArrayRef< const Expr * > Args, SourceLocation Loc)
Emit diagnostics for the diagnose_if attributes on Function, ignoring any non-ArgDependent DiagnoseIf...
virtual ~ContextualImplicitConverter()
Whether and why a template name is required in this lookup.
static const unsigned MaxAlignmentExponent
The maximum alignment, same as in llvm::Value.
ExprResult ActOnSizeofParameterPackExpr(Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc)
Called when an expression computing the size of a parameter pack is parsed.
OMPClause * ActOnOpenMPNumThreadsClause(Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_threads' clause.
void PushUsingDirective(Scope *S, UsingDirectiveDecl *UDir)
@ TU_Complete
The translation unit is a complete translation unit.
CodeSegAttr * mergeCodeSegAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Name)
bool IsBuildingRecoveryCallExpr
Flag indicating if Sema is building a recovery call expression.
TypedefDecl * ParseTypedefDecl(Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo)
Subroutines of ActOnDeclarator().
llvm::MapVector< IdentifierInfo *, llvm::SetVector< WeakInfo, llvm::SmallVector< WeakInfo, 1u >, llvm::SmallDenseSet< WeakInfo, 2u, WeakInfo::DenseMapInfoByAliasOnly > > > WeakUndeclaredIdentifiers
WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared.
TemplateDecl * AdjustDeclIfTemplate(Decl *&Decl)
AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference...
Mode getAlignMode() const
OpenCLOptions OpenCLFeatures
void handleTagNumbering(const TagDecl *Tag, Scope *TagScope)
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
SourceRange getSourceRange() const LLVM_READONLY
Get the full source range.
BasePaths - Represents the set of paths from a derived class to one of its (direct or indirect) bases...
void CodeCompletePreprocessorMacroArgument(Scope *S, IdentifierInfo *Macro, MacroInfo *MacroInfo, unsigned Argument)
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
void MarkDeclarationsReferencedInExpr(Expr *E, bool SkipLocalVariables=false, ArrayRef< const Expr * > StopAt=None)
Mark any declarations that appear within this expression or any potentially-evaluated subexpressions ...
@ LOLR_Raw
The lookup found a single 'raw' literal operator, which expects a string literal containing the spell...
bool checkAllowedSYCLInitializer(VarDecl *VD)
StmtResult ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef< Token > AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef< StringRef > Constraints, ArrayRef< StringRef > Clobbers, ArrayRef< Expr * > Exprs, SourceLocation EndLoc)
@ PCC_LocalDeclarationSpecifiers
Code completion occurs within a sequence of declaration specifiers within a function,...
@ DAR_FailedAlreadyDiagnosed
@ UPPC_FixedUnderlyingType
The fixed underlying type of an enumeration.
OMPClause * ActOnOpenMPSimdlenClause(Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'simdlen' clause.
void SetLateTemplateParser(LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, void *P)
FriendDecl * CheckFriendTypeDecl(SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo)
Perform semantic analysis of the given friend type declaration.
InClassInitStyle
In-class initialization styles for non-static data members.
CXXBaseSpecifier * CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
ActOnBaseSpecifier - Parsed a base specifier.
virtual SemaDiagnosticBuilder diagnoseIncomplete(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic when the expression has incomplete class type.
bool isUnexpandedParameterPackPermitted()
Determine whether an unexpanded parameter pack might be permitted in this location.
void NoteDeletedInheritingConstructor(CXXConstructorDecl *CD)
ExprResult ActOnOMPArrayShapingExpr(Expr *Base, SourceLocation LParenLoc, SourceLocation RParenLoc, ArrayRef< Expr * > Dims, ArrayRef< SourceRange > Brackets)
QualType ProduceConstructorSignatureHelp(QualType Type, SourceLocation Loc, ArrayRef< Expr * > Args, SourceLocation OpenParLoc, bool Braced)
bool IsInsideALocalClassWithinATemplateFunction()
NamedDecl * ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle)
ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed.
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
ExprResult checkUnknownAnyCast(SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path)
Check a cast of an unknown-any type.
void popObjCTypeParamList(Scope *S, ObjCTypeParamList *typeParamList)
@ UPPC_DeclarationQualifier
A declaration qualifier.
bool RequireCompleteEnumDecl(EnumDecl *D, SourceLocation L, CXXScopeSpec *SS=nullptr)
Require that the EnumDecl is completed with its enumerators defined or instantiated.
@ ACK_Comparison
A comparison.
void DiagnoseUnusedParameters(ArrayRef< ParmVarDecl * > Parameters)
Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.
VarDecl * buildCoroutinePromise(SourceLocation Loc)
@ LookupObjCImplicitSelfParam
Look up implicit 'self' parameter of an objective-c method.
void CodeCompleteBracketDeclarator(Scope *S)
NamedDecl * DeclClonePragmaWeak(NamedDecl *ND, const IdentifierInfo *II, SourceLocation Loc)
bool checkSectionName(SourceLocation LiteralLoc, StringRef Str)
A push'd group of PragmaAttributeEntries.
bool ShouldWarnIfUnusedFileScopedDecl(const DeclaratorDecl *D) const
void AddSYCLIntelLoopFuseAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
PragmaAlignPackDiagnoseKind
void ActOnPragmaMSPointersToMembers(LangOptions::PragmaMSPointersToMembersKind Kind, SourceLocation PragmaLoc)
ActOnPragmaMSPointersToMembers - called on well formed #pragma pointers_to_members(representation met...
A wrapper class around a pointer that always points to its canonical declaration.
~LocalEagerInstantiationScope()
void diagnoseMissingTemplateArguments(TemplateName Name, SourceLocation Loc)
void ActOnAbortSEHFinallyBlock()
NamespaceDecl * getOrCreateStdNamespace()
Retrieve the special "std" namespace, which may require us to implicitly define the namespace.
bool InImmediateFunctionContext
DefaultedComparisonKind asComparison() const
OMPClause * ActOnOpenMPTaskReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=llvm::None)
Called on well-formed 'task_reduction' clause.
The return type of classify().
CharUnits - This is an opaque type for sizes expressed in character units.
DarwinSDKInfo * getDarwinSDKInfoForAvailabilityChecking()
void setFunctionHasBranchIntoScope()
SmallVector< Scope *, 2 > CurrentSEHFinally
Stack of active SEH __finally scopes. Can be empty.
SpecialMemberOverloadResult LookupSpecialMember(CXXRecordDecl *D, CXXSpecialMember SM, bool ConstArg, bool VolatileArg, bool RValueThis, bool ConstThis, bool VolatileThis)
bool isImplicitlyDeleted(FunctionDecl *FD)
Determine whether the given function is an implicitly-deleted special member function.
void DiagnoseUnusedDecl(const NamedDecl *ND)
DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(u...
llvm::Error isValidSectionSpecifier(StringRef Str)
void MarkDeclarationsReferencedInType(SourceLocation Loc, QualType T)
Mark all of the declarations referenced within a particular AST node as referenced.
NamespaceDecl * StdExperimentalNamespaceCache
The C++ "std::experimental" namespace, where the experimental parts of the standard library resides.
void inheritCUDATargetAttrs(FunctionDecl *FD, const FunctionTemplateDecl &TD)
Copies target attributes from the template TD to the function FD.
void MarkVariableReferenced(SourceLocation Loc, VarDecl *Var)
Mark a variable referenced, and check whether it is odr-used (C++ [basic.def.odr]p2,...
CXXSpecialMember
Kinds of C++ special members.
Optional< unsigned > getNumArgumentsInExpansion(QualType T, const MultiLevelTemplateArgumentList &TemplateArgs)
Determine the number of arguments in the given pack expansion type.
bool checkAndRewriteMustTailAttr(Stmt *St, const Attr &MTA)
Check whether the given statement can have musttail applied to it, issuing a diagnostic and returning...
bool CheckVariableDeclaration(VarDecl *NewVD, LookupResult &Previous)
Perform semantic checking on a newly-created variable declaration.
FormatAttr * mergeFormatAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Format, int FormatIdx, int FirstArg)
void ActOnOpenMPDeclareReductionCombinerEnd(Decl *D, Expr *Combiner)
Finish current declare reduction construct initializer.
void DiagnoseUnsatisfiedConstraint(const ConstraintSatisfaction &Satisfaction, bool First=true)
Emit diagnostics explaining why a constraint expression was deemed unsatisfied.
NonOdrUseReason getNonOdrUseReasonInCurrentContext(ValueDecl *D)
If D cannot be odr-used in the current expression evaluation context, return a reason explaining why.
@ TPL_TemplateMatch
We are matching the template parameter lists of two templates that might be redeclarations.
PragmaClangSection PragmaClangDataSection
EnumConstantDecl * CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *val)
MemInitResult BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc)
ParsedTemplateArgument ActOnTemplateTypeArgument(TypeResult ParsedType)
Convert a parsed type into a parsed template argument.
void AddSYCLIntelFPGAInitiationIntervalAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
void ActOnOpenMPAssumesDirective(SourceLocation Loc, OpenMPDirectiveKind DKind, ArrayRef< std::string > Assumptions, bool SkippedClauses)
Called on well-formed '#pragma omp [begin] assume[s]'.
bool InstantiateClassTemplateSpecialization(SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK, bool Complain=true)
TypeResult ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy Template, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, bool IsCtorOrDtorName=false, bool IsClassName=false)
void CheckCompleteDecompositionDeclaration(DecompositionDecl *DD)
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
@ TPC_FriendFunctionTemplateDefinition
StmtResult ActOnOpenMPTaskDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp task' after parsing of the associated statement.
void GatherGlobalCodeCompletions(CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo, SmallVectorImpl< CodeCompletionResult > &Results)
bool isAbstractType(SourceLocation Loc, QualType T)
void CodeCompleteObjCPropertyDefinition(Scope *S)
DeferDiagsRAII(Sema &S, bool DeferDiags)
@ LookupOrdinaryName
Ordinary name lookup, which finds ordinary names (functions, variables, typedefs, etc....
@ UPPC_DefaultArgument
A default argument.
SYCLIntelNumSimdWorkItemsAttr * MergeSYCLIntelNumSimdWorkItemsAttr(Decl *D, const SYCLIntelNumSimdWorkItemsAttr &A)
@ TNK_Concept_template
The name refers to a concept.
DeclGroupPtrTy ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef< Expr * > Uniforms, ArrayRef< Expr * > Aligneds, ArrayRef< Expr * > Alignments, ArrayRef< Expr * > Linears, ArrayRef< unsigned > LinModifiers, ArrayRef< Expr * > Steps, SourceRange SR)
Called on well-formed '#pragma omp declare simd' after parsing of the associated method/function.
ExprResult BuildSYCLUniqueStableNameExpr(SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, TypeSourceInfo *TSI)
@ IncompatibleNestedPointerQualifiers
IncompatibleNestedPointerQualifiers - The assignment is between two nested pointer types,...
ObjCMethodDecl * NSNumberLiteralMethods[NSAPI::NumNSNumberLiteralMethods]
The Objective-C NSNumber methods used to create NSNumber literals.
NamedDecl * BuildUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation NameLoc, EnumDecl *ED)
@ TDK_TooFewArguments
When performing template argument deduction for a function template, there were too few call argument...
void CheckTollFreeBridgeCast(QualType castType, Expr *castExpr)
ParmVarDecl * BuildParmVarDeclForTypedef(DeclContext *DC, SourceLocation Loc, QualType T)
Synthesizes a variable for a parameter arising from a typedef.
void updateOutOfDateSelector(Selector Sel)
Helper class that collects exception specifications for implicitly-declared special member functions.
void CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body)
DeclGroupPtrTy ActOnFinishObjCImplementation(Decl *ObjCImpDecl, ArrayRef< Decl * > Decls)
static int getOpenMPCaptureLevels(OpenMPDirectiveKind Kind)
Return the number of captured regions created for an OpenMP directive.
ArrayRef< sema::FunctionScopeInfo * > getFunctionScopes() const
OMPClause * ActOnOpenMPUntiedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'untied' clause.
bool areVectorTypesSameSize(QualType srcType, QualType destType)
void DefineImplicitLambdaToFunctionPointerConversion(SourceLocation CurrentLoc, CXXConversionDecl *Conv)
Define the "body" of the conversion from a lambda object to a function pointer.
ExprResult CheckForImmediateInvocation(ExprResult E, FunctionDecl *Decl)
Wrap the expression in a ConstantExpr if it is a potential immediate invocation.
std::pair< ObjCMethodList, ObjCMethodList > Lists
void AddRangeBasedOptnone(FunctionDecl *FD)
Only called on function definitions; if there is a pragma in scope with the effect of a range-based o...
CheckTemplateArgumentKind
Specifies the context in which a particular template argument is being checked.
@ EST_NoexceptFalse
noexcept(expression), evals to 'false'
DeclContext * FindInstantiatedContext(SourceLocation Loc, DeclContext *DC, const MultiLevelTemplateArgumentList &TemplateArgs)
Finds the instantiation of the given declaration context within the current instantiation.
bool SubstTypeConstraint(TemplateTypeParmDecl *Inst, const TypeConstraint *TC, const MultiLevelTemplateArgumentList &TemplateArgs)
NamedDecl * HandleDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists)
const FunctionProtoType::ExtParameterInfo * getPointerOrNull(unsigned numParams)
Return a pointer (suitable for setting in an ExtProtoInfo) to the ExtParameterInfo array we've built ...
@ CVT_Host
Emitted on device side with a shadow variable on host side.
void CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range)
StmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R, ArrayRef< Stmt * > Elts, bool isStmtExpr)
OMPClause * ActOnOpenMPDeviceClause(OpenMPDeviceClauseModifier Modifier, Expr *Device, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Called on well-formed 'device' clause.
CastKind
CastKind - The kind of operation required for a conversion.
StmtResult ActOnOpenMPParallelMasterTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel master taskloop simd' after parsing of the associated sta...
void referenceDLLExportedClassMethods()
OMPClause * ActOnOpenMPAtomicDefaultMemOrderClause(OpenMPAtomicDefaultMemOrderClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'atomic_default_mem_order' clause.
Expr * BuildBuiltinCallExpr(SourceLocation Loc, Builtin::ID Id, MultiExprArg CallArgs)
BuildBuiltinCallExpr - Create a call to a builtin function specified by Id.
Declaration of a variable template.
PrintingPolicy getPrintingPolicy() const
Retrieve a suitable printing policy for diagnostics.
Decl * ActOnFinishExportDecl(Scope *S, Decl *ExportDecl, SourceLocation RBraceLoc)
Complete the definition of an export declaration.
ExprResult forceUnknownAnyToType(Expr *E, QualType ToType)
Force an expression with unknown-type to an expression of the given type.
@ AbstractSynthesizedIvarType
ExprResult ActOnCaseExpr(SourceLocation CaseLoc, ExprResult Val)
void DecomposeUnqualifiedId(const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs)
Decomposes the given name into a DeclarationNameInfo, its location, and possibly a list of template a...
StmtResult ActOnOpenMPTargetDataDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target data' after parsing of the associated statement.
StmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc, Decl *ExDecl, Stmt *HandlerBlock)
ActOnCXXCatchBlock - Takes an exception declaration and a handler block and creates a proper catch ha...
void CodeCompleteConstructorInitializer(Decl *Constructor, ArrayRef< CXXCtorInitializer * > Initializers)
ExprResult ActOnPredefinedExpr(SourceLocation Loc, tok::TokenKind Kind)
bool CheckRegparmAttr(const ParsedAttr &attr, unsigned &value)
Decl * ActOnProperty(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
llvm::SmallPtrSet< const Decl *, 4 > ParsingInitForAutoVars
ParsingInitForAutoVars - a set of declarations with auto types for which we are currently parsing the...
RecordDecl * MSVCGuidDecl
The MSVC "_GUID" struct, which is defined in MSVC header files.
void AddSYCLIntelMaxWorkGroupSizeAttr(Decl *D, const AttributeCommonInfo &CI, Expr *XDim, Expr *YDim, Expr *ZDim)
const Decl * PragmaAttributeCurrentTargetDecl
The declaration that is currently receiving an attribute from the #pragma attribute stack.
This represents one expression.
Represents a C++ declaration that introduces decls from somewhere else.
bool ActOnAccessSpecifier(AccessSpecifier Access, SourceLocation ASLoc, SourceLocation ColonLoc, const ParsedAttributesView &Attrs)
ActOnAccessSpecifier - Parsed an access specifier followed by a colon.
void FindAssociatedClassesAndNamespaces(SourceLocation InstantiationLoc, ArrayRef< Expr * > Args, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses)
Find the associated classes and namespaces for argument-dependent lookup for a call with the given se...
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
std::tuple< MangleNumberingContext *, Decl * > getCurrentMangleNumberContext(const DeclContext *DC)
Compute the mangling number context for a lambda expression or block literal.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
VarDecl * ActOnOpenMPDeclareReductionInitializerStart(Scope *S, Decl *D)
Initialize declare reduction construct initializer.
OMPClause * ActOnOpenMPGrainsizeClause(Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'grainsize' clause.
void CheckFunctionOrTemplateParamDeclarator(Scope *S, Declarator &D)
Common checks for a parameter-declaration that should apply to both function parameters and non-type ...
llvm::DenseMap< Selector, Lists >::iterator iterator
Decl * Entity
The entity that is being synthesized.
VerifyICEDiagnoser(bool Suppress=false)
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
virtual void ReadTentativeDefinitions(SmallVectorImpl< VarDecl * > &TentativeDefs)
Read the set of tentative definitions known to the external Sema source.
bool checkSYCLDeviceFunction(SourceLocation Loc, FunctionDecl *Callee)
Check whether we're allowed to call Callee from the current context.
void DiagnoseUnusedBackingIvarInAccessor(Scope *S, const ObjCImplementationDecl *ImplD)
DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which backs the property is n...
void AddSYCLIntelNumSimdWorkItemsAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
MSPropertyDecl * HandleMSProperty(Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS, const ParsedAttr &MSPropertyAttr)
HandleMSProperty - Analyze a __delcspec(property) field of a C++ class.
static NameClassification Error()
A requires-expression requirement which queries the validity and properties of an expression ('simple...
void AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
Add the overload candidates named by callee and/or found by argument dependent lookup to the given ov...
QualType buildLambdaInitCaptureInitialization(SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions, IdentifierInfo *Id, bool DirectInit, Expr *&Init)
ExprResult BuildCXXThrow(SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope)
Keeps information about an identifier in a nested-name-spec.
bool SetDelegatingInitializer(CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer)
void AddAlignmentAttributesForRecord(RecordDecl *RD)
AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl,...
bool isCurrentClassName(const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=nullptr)
isCurrentClassName - Determine whether the identifier II is the name of the class type currently bein...
@ LookupOMPReductionName
Look up the name of an OpenMP user-defined reduction operation.
Represents a C++ base or member initializer.
@ AP_PragmaClangAttribute
The availability attribute was applied using '#pragma clang attribute'.
bool isStdInitializerList(QualType Ty, QualType *Element)
Tests whether Ty is an instance of std::initializer_list and, if it is and Element is not NULL,...
ExprResult BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef< Expr * > Arg, SourceLocation RParenLoc, Expr *Config=nullptr, bool IsExecConfig=false, ADLCallKind UsesADL=ADLCallKind::NotADL)
BuildResolvedCallExpr - Build a call to a resolved expression, i.e.
bool DefineUsedVTables()
Define all of the vtables that have been used in this translation unit and reference any virtual memb...
CXXSpecialMember asSpecialMember() const
QualType getCurrentThisType()
Try to retrieve the type of the 'this' pointer.
void SubstExceptionSpec(FunctionDecl *New, const FunctionProtoType *Proto, const MultiLevelTemplateArgumentList &Args)
bool canSkipFunctionBody(Decl *D)
Determine whether we can skip parsing the body of a function definition, assuming we don't care about...
OMPClause * ActOnOpenMPDependClause(Expr *DepModifier, OpenMPDependClauseKind DepKind, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'depend' clause.
PragmaClangSection PragmaClangRodataSection
void checkAllowedCUDAInitializer(VarDecl *VD)
ExprResult ActOnNameClassifiedAsNonType(Scope *S, const CXXScopeSpec &SS, NamedDecl *Found, SourceLocation NameLoc, const Token &NextToken)
Act on the result of classifying a name as a specific non-type declaration.
void incrementMSManglingNumber() const
void CodeCompleteObjCMethodDeclSelector(Scope *S, bool IsInstanceMethod, bool AtParameterName, ParsedType ReturnType, ArrayRef< IdentifierInfo * > SelIdents)
QualType BuildReferenceType(QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity)
Build a reference type.
unsigned size() const
The number of exceptions in the exception specification.
ExprResult BuildObjCEncodeExpression(SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc)
@ LOLR_Cooked
The lookup found a single 'cooked' literal operator, which expects a normal literal to be built and p...
bool ActOnCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, bool ErrorRecoveryLookup=false, bool *IsCorrectedToColon=nullptr, bool OnlyNamespace=false)
The parser has parsed a nested-name-specifier 'identifier::'.
@ NC_VarTemplate
The name was classified as a variable template name.
@ LookupUsingDeclName
Look up all declarations in a scope with the given name, including resolved using declarations.
void enterMemAccess(Sema &S, SourceLocation Tok, Expr *Base)
bool CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Target, const LookupResult &PreviousDecls, UsingShadowDecl *&PrevShadow)
Determines whether to create a using shadow decl for a particular decl, given the set of decls existi...
void AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion)
AddAlignedAttr - Adds an aligned attribute to a particular declaration.
ExprResult ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc)
void EmitCurrentDiagnostic(unsigned DiagID)
Cause the active diagnostic on the DiagosticsEngine to be emitted.
@ UPPC_NonTypeTemplateParameterType
The type of a non-type template parameter.
void AddSYCLIntelESimdVectorizeAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
QualType DeduceTemplateSpecializationFromInitializer(TypeSourceInfo *TInfo, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Init)
Wraps an identifier and optional source location for the identifier.
ExprResult ActOnLambdaExpr(SourceLocation StartLoc, Stmt *Body, Scope *CurScope)
ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed.
bool diagnoseArgIndependentDiagnoseIfAttrs(const NamedDecl *ND, SourceLocation Loc)
Emit diagnostics for the diagnose_if attributes on Function, ignoring any ArgDependent DiagnoseIfAttr...
void MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, bool MightBeOdrUse=true)
Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2,...
StmtResult ActOnOpenMPTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp taskloop simd' after parsing of the associated statement.
TypeSourceInfo * CheckPackExpansion(TypeSourceInfo *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
Construct a pack expansion type from the pattern of the pack expansion.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
WorkGroupSizeHintAttr * MergeWorkGroupSizeHintAttr(Decl *D, const WorkGroupSizeHintAttr &A)
Represents a class template specialization, which refers to a class template with a given set of temp...
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
void CheckDelegatingCtorCycles()
std::pair< const IdentifierInfo *, uint64_t > TypeTagMagicValue
A pair of ArgumentKind identifier and magic value.
AccessResult CheckMemberOperatorAccess(SourceLocation Loc, Expr *ObjectExpr, const SourceRange &, DeclAccessPair FoundDecl)
bool checkUnsafeAssigns(SourceLocation Loc, QualType LHS, Expr *RHS)
checkUnsafeAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained type.
bool SubstExprs(ArrayRef< Expr * > Exprs, bool IsCall, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< Expr * > &Outputs)
Substitute the given template arguments into a list of expressions, expanding pack expansions if requ...
std::unique_ptr< NSAPI > NSAPIObj
Caches identifiers/selectors for NSFoundation APIs.
bool CheckExceptionSpecCompatibility(Expr *From, QualType ToType)
StmtResult ActOnOpenMPTargetParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel for' after parsing of the associated statement.
TemplateDeductionResult FinishTemplateArgumentDeduction(FunctionTemplateDecl *FunctionTemplate, SmallVectorImpl< DeducedTemplateArgument > &Deduced, unsigned NumExplicitlySpecified, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, SmallVectorImpl< OriginalCallArg > const *OriginalCallArgs=nullptr, bool PartialOverloading=false, llvm::function_ref< bool()> CheckNonDependent=[]{ return false;})
Finish template argument deduction for a function template, checking the deduced template arguments f...
llvm::DenseMap< IdentifierInfo *, AsmLabelAttr * > ExtnameUndeclaredIdentifiers
ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared.
ExprResult ActOnCompoundLiteral(SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc, Expr *InitExpr)
Module * getOwningModule(const Decl *Entity)
Get the module owning an entity.
void ActOnPopScope(SourceLocation Loc, Scope *S)
Scope actions.
OMPClause * ActOnOpenMPUnifiedSharedMemoryClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'unified_address' clause.
ExprResult BuildBlockForLambdaConversion(SourceLocation CurrentLocation, SourceLocation ConvLocation, CXXConversionDecl *Conv, Expr *Src)
@ Conversions
Allow explicit conversion functions but not explicit constructors.
@ NC_Error
Classification failed; an error has been produced.
CheckedConversionKind
The kind of conversion being performed.
WebAssemblyImportModuleAttr * mergeImportModuleAttr(Decl *D, const WebAssemblyImportModuleAttr &AL)
enum clang::Sema::CodeSynthesisContext::SynthesisKind Kind
ExprResult BuildTypeTrait(TypeTrait Kind, SourceLocation KWLoc, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc)
@ PCC_Type
Code completion occurs where only a type is permitted.
bool CheckPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess, bool Diagnose=true)
CheckPointerConversion - Check the pointer conversion from the expression From to the type ToType.
ExprResult ActOnNameClassifiedAsOverloadSet(Scope *S, Expr *OverloadSet)
Act on the result of classifying a name as an overload set.
void DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID)
DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused,...
ExprResult ParseObjCStringLiteral(SourceLocation *AtLocs, ArrayRef< Expr * > Strings)
void CodeCompleteObjCPropertySetter(Scope *S)
bool DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, SourceLocation QuestionLoc)
Emit a specialized diagnostic when one expression is a null pointer constant and the other is not a p...
StmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body)
TemplateNameKind isTemplateName(Scope *S, CXXScopeSpec &SS, bool hasTemplateKeyword, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool &MemberOfUnknownSpecialization, bool Disambiguation=false)
ExprResult BuildSYCLBuiltinNumFieldsExpr(SourceLocation Loc, QualType SourceTy)
A reference to a declared variable, function, enum, etc.
void ActOnPureSpecifier(Decl *D, SourceLocation PureSpecLoc)
Represent a C++ namespace.
SYCLIntegrationHeader & getSyclIntegrationHeader()
Lazily creates and returns SYCL integration header instance.
QualType NSNumberPointer
Pointer to NSNumber type (NSNumber *).
Represents a function declaration or definition.
@ Ref_Compatible
Ref_Compatible - The two types are reference-compatible.
@ DefaultedOperator
A defaulted 'operator<=>' needed the comparison category.
ExprResult BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr)
void AddSYCLAddIRAttributesGlobalVariableAttr(Decl *D, const AttributeCommonInfo &CI, MutableArrayRef< Expr * > Args)
ExprResult prepareVectorSplat(QualType VectorTy, Expr *SplattedExpr)
Prepare SplattedExpr for a vector splat operation, adding implicit casts if necessary.
void set(unsigned index, FunctionProtoType::ExtParameterInfo info)
Set the ExtParameterInfo for the parameter at the given index,.
Represents a struct/union/class.
OMPClause * ActOnOpenMPUseClause(Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'use' clause.
llvm::PointerUnion< TemplateTypeParmDecl *, NonTypeTemplateParmDecl *, TemplateTemplateParmDecl * > TemplateParameter
Stores a template parameter of any kind.
void ActOnFinishCXXMemberSpecification(Scope *S, SourceLocation RLoc, Decl *TagDecl, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &AttrList)
ExprResult ActOnCXXTypeConstructExpr(ParsedType TypeRep, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization)
ActOnCXXTypeConstructExpr - Parse construction of a specified type.
llvm::MapVector< NamedDecl *, SourceLocation > UndefinedButUsed
UndefinedInternals - all the used, undefined objects which require a definition in this translation u...
const QualType * data() const
The set of exceptions in the exception specification.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
ExprResult HandleExprEvaluationContextForTypeof(Expr *E)
ExprResult ActOnCXXUuidof(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
ActOnCXXUuidof - Parse __uuidof( something ).
bool CheckConstraintExpression(const Expr *CE, Token NextToken=Token(), bool *PossibleNonPrimary=nullptr, bool IsTrailingRequiresClause=false)
Check whether the given expression is a valid constraint expression.
bool NeedToCaptureVariable(VarDecl *Var, SourceLocation Loc)
Checks if the variable must be captured.
bool CheckRedeclarationModuleOwnership(NamedDecl *New, NamedDecl *Old)
We've determined that New is a redeclaration of Old.
void add(const sema::DelayedDiagnostic &diag)
Adds a delayed diagnostic.
@ PriorTemplateArgumentSubstitution
We are substituting prior template arguments into a new template parameter.
SYCLIntelFPGAInitiationIntervalAttr * MergeSYCLIntelFPGAInitiationIntervalAttr(Decl *D, const SYCLIntelFPGAInitiationIntervalAttr &A)
Decl * ActOnStartOfFunctionDef(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists, SkipBodyInfo *SkipBody=nullptr)
bool isTemplateTemplateParameterAtLeastAsSpecializedAs(TemplateParameterList *PParam, TemplateDecl *AArg, SourceLocation Loc)
ExprResult checkPseudoObjectIncDec(Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opcode, Expr *Op)
Check an increment or decrement of a pseudo-object expression.
SYCLIntelESimdVectorizeAttr * MergeSYCLIntelESimdVectorizeAttr(Decl *D, const SYCLIntelESimdVectorizeAttr &A)
OMPClause * ActOnOpenMPThreadLimitClause(Expr *ThreadLimit, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'thread_limit' clause.
void CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden)
Check whether the given new method is a valid override of the given overridden method,...
@ DefiningSynthesizedFunction
We are defining a synthesized function (such as a defaulted special member).
PragmaStack< MSVtorDispMode > VtorDispStack
Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI.
Decl * ActOnTemplateDeclarator(Scope *S, MultiTemplateParamsArg TemplateParameterLists, Declarator &D)
bool hasVisibleMergedDefinition(NamedDecl *Def)
ExprResult CheckBooleanCondition(SourceLocation Loc, Expr *E, bool IsConstexpr=false)
CheckBooleanCondition - Diagnose problems involving the use of the given expression as a boolean cond...
StmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw, Scope *CurScope)
void CodeCompleteObjCClassPropertyRefExpr(Scope *S, IdentifierInfo &ClassName, SourceLocation ClassNameLoc, bool IsBaseExprStatement)
TypeSourceInfo * RebuildTypeInCurrentInstantiation(TypeSourceInfo *T, SourceLocation Loc, DeclarationName Name)
Rebuilds a type within the context of the current instantiation.
SYCLIntelFPGALoopCoalesceAttr * BuildSYCLIntelFPGALoopCoalesceAttr(const AttributeCommonInfo &CI, Expr *E)
void operator()(sema::FunctionScopeInfo *Scope) const
CUDAFunctionTarget IdentifyCUDATarget(const FunctionDecl *D, bool IgnoreImplicitHDAttr=false)
Determines whether the given function is a CUDA device/host/kernel/etc.
bool CheckMemberPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
CheckMemberPointerConversion - Check the member pointer conversion from the expression From to the ty...
bool isDeductionGuideName(Scope *S, const IdentifierInfo &Name, SourceLocation NameLoc, ParsedTemplateTy *Template=nullptr)
Determine whether a particular identifier might be the name in a C++1z deduction-guide declaration.
StmtResult ActOnOpenMPSectionsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp sections' after parsing of the associated statement.
ExprResult ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr)
ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
llvm::FoldingSet< SpecialMemberOverloadResultEntry > SpecialMemberCache
A cache of special member function overload resolution results for C++ records.
void DiagnoseAssignmentAsCondition(Expr *E)
DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition,...
@ TDK_Underqualified
Template argument deduction failed due to inconsistent cv-qualifiers on a template parameter type tha...
bool operator==(const CallGraphNode::CallRecord &LHS, const CallGraphNode::CallRecord &RHS)
sema::TemplateDeductionInfo * DeductionInfo
The template deduction info object associated with the substitution or checking of explicit or deduce...
bool SawTypeNullability
Whether we saw any type nullability annotations in the given file.
ExprResult BuildVectorLiteral(SourceLocation LParenLoc, SourceLocation RParenLoc, Expr *E, TypeSourceInfo *TInfo)
Build an altivec or OpenCL literal.
bool RequireCompleteExprType(Expr *E, unsigned DiagID, const Ts &...Args)
void setFunctionHasBranchProtectedScope()
QualType getCompletedType(Expr *E)
Get the type of expression E, triggering instantiation to complete the type if necessary – that is,...
void ActOnStmtExprError()
void ProcessDeclAttributeDelayed(Decl *D, const ParsedAttributesView &AttrList)
void AddReqdWorkGroupSizeAttr(Decl *D, const AttributeCommonInfo &CI, Expr *XDim, Expr *YDim, Expr *ZDim)
TypeLoc getReturnTypeLoc(FunctionDecl *FD) const
void DefineDefaultedComparison(SourceLocation Loc, FunctionDecl *FD, DefaultedComparisonKind DCK)
QualType BuildStdInitializerList(QualType Element, SourceLocation Loc)
Looks for the std::initializer_list template and instantiates it with Element, or emits an error if i...
ExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc, Stmt *Body, Scope *CurScope)
ActOnBlockStmtExpr - This is called when the body of a block statement literal was successfully compl...
bool RequireStructuralType(QualType T, SourceLocation Loc)
Require the given type to be a structural type, and diagnose if it is not.
ExprResult BuildSYCLBuiltinBaseTypeExpr(SourceLocation Loc, QualType SourceTy, Expr *Idx)
@ MarkingClassDllexported
We are marking a class as __dllexport.
bool CheckLiteralOperatorDeclaration(FunctionDecl *FnDecl)
CheckLiteralOperatorDeclaration - Check whether the declaration of this literal operator function is ...
void CodeCompleteObjCMessageReceiver(Scope *S)
CastKind PrepareCastToObjCObjectPointer(ExprResult &E)
Prepare a conversion of the given expression to an ObjC object pointer type.
OMPClause * ActOnOpenMPReleaseClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'release' clause.
LateInstantiatedAttribute(const Attr *A, LocalInstantiationScope *S, Decl *D)
void CodeCompleteObjCPropertyFlags(Scope *S, ObjCDeclSpec &ODS)
bool SubstBaseSpecifiers(CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
Perform substitution on the base class specifiers of the given class template specialization.
void ActOnFinishRequiresExpr()
OpaquePtr< QualType > TypeTy
Decl * ActOnParamDeclarator(Scope *S, Declarator &D)
ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into fun...
Captures information about "declaration specifiers".
void FillInlineAsmIdentifierInfo(Expr *Res, llvm::InlineAsmIdentifierInfo &Info)
OMPClause * ActOnOpenMPSizesClause(ArrayRef< Expr * > SizeExprs, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-form 'sizes' clause.
unsigned NumSFINAEErrors
The number of SFINAE diagnostics that have been trapped.
std::string getTemplateArgumentBindingsText(const TemplateParameterList *Params, const TemplateArgumentList &Args)
Produces a formatted string that describes the binding of template parameters to template arguments.
void ActOnModuleBegin(SourceLocation DirectiveLoc, Module *Mod)
The parsed has entered a submodule.
void SentinelAction(PragmaMsStackAction Action, StringRef Label)
void CodeCompleteAfterIf(Scope *S, bool IsBracedThen)
StmtResult ActOnOpenMPParallelMasterDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel master' after parsing of the associated statement.
std::unique_ptr< sema::FunctionScopeInfo, PoppedFunctionScopeDeleter > PoppedFunctionScopePtr
bool CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee)
Check whether we're allowed to call Callee from the current context.
@ UPPC_DataMemberType
The type of a data member.
ParsingDeclState PushParsingDeclaration(sema::DelayedDiagnosticPool &pool)
SmallVector< Decl *, 2 > WeakTopLevelDecl
WeakTopLevelDecl - Translation-unit scoped declarations generated by #pragma weak during processing o...
@ Sycl
SYCL specific diagnostic.
@ UPPC_UsingDeclaration
A using declaration.
Expr * BuildCXXThisExpr(SourceLocation Loc, QualType Type, bool IsImplicit)
Build a CXXThisExpr and mark it referenced in the current context.
void AdjustDestructorExceptionSpec(CXXDestructorDecl *Destructor)
Build an exception spec for destructors that don't have one.
SYCLAddIRAttributesGlobalVariableAttr * MergeSYCLAddIRAttributesGlobalVariableAttr(Decl *D, const SYCLAddIRAttributesGlobalVariableAttr &A)
BaseResult ActOnBaseSpecifier(Decl *classdecl, SourceRange SpecifierRange, const ParsedAttributesView &Attrs, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc)
ActOnBaseSpecifier - Parsed a base specifier.
bool CheckARCMethodDecl(ObjCMethodDecl *method)
Check a method declaration for compatibility with the Objective-C ARC conventions.
QualType BuildUnaryTransformType(QualType BaseType, UnaryTransformType::UTTKind UKind, SourceLocation Loc)
AccessResult CheckBaseClassAccess(SourceLocation AccessLoc, QualType Base, QualType Derived, const CXXBasePath &Path, unsigned DiagID, bool ForceCheck=false, bool ForceUnprivileged=false)
Checks access for a hierarchy conversion.
SYCLIntelLoopFuseAttr * MergeSYCLIntelLoopFuseAttr(Decl *D, const SYCLIntelLoopFuseAttr &A)
A class for storing results from argument-dependent lookup.
QualType deduceVarTypeFromInitializer(VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init)
llvm::SmallPtrSet< DeclRefExpr *, 4 > ReferenceToConsteval
Set of DeclRefExprs referencing a consteval function when used in a context not already known to be i...
void InstantiateClassMembers(SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
Instantiates the definitions of all of the member of the given class, which is an instantiation of a ...
bool IsPointerConversion(Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType, bool &IncompatibleObjC)
IsPointerConversion - Determines whether the conversion of the expression From, which has the (possib...
static int getPrintable(int I)
Records and restores the CurFPFeatures state on entry/exit of compound statements.
void CodeCompleteObjCInterfaceCategory(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
bool makeUnavailableInSystemHeader(SourceLocation loc, UnavailableAttr::ImplicitReason reason)
makeUnavailableInSystemHeader - There is an error in the current context.
StmtResult ActOnOpenMPParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel for' after parsing of the associated statement.
ObjCMethodDecl * LookupMethodInObjectType(Selector Sel, QualType Ty, bool IsInstance)
LookupMethodInType - Look up a method in an ObjCObjectType.
bool checkThisInStaticMemberFunctionExceptionSpec(CXXMethodDecl *Method)
Whether this' shows up in the exception specification of a static member function.
class clang::Sema::DelayedDiagnostics DelayedDiagnostics
@ ImmediateFunctionContext
In addition of being constant evaluated, the current expression occurs in an immediate function conte...
void ActOnPragmaFPReassociate(SourceLocation Loc, bool IsEnabled)
Called on well formed #pragma clang fp reassociate.
@ CCK_ForBuiltinOverloadedOp
A conversion for an operand of a builtin overloaded operator.
ArgumentPackSubstitutionIndexRAII(Sema &Self, int NewSubstitutionIndex)
NamedReturnInfo getNamedReturnInfo(Expr *&E, SimplerImplicitMoveMode Mode=SimplerImplicitMoveMode::Normal)
Determine whether the given expression might be move-eligible or copy-elidable in either a (co_)retur...
void Clear()
Note that we have finished instantiating this template.
bool CheckTemplatePartialSpecializationArgs(SourceLocation Loc, TemplateDecl *PrimaryTemplate, unsigned NumExplicitArgs, ArrayRef< TemplateArgument > Args)
Check the non-type template arguments of a class template partial specialization according to C++ [te...
Represents a C++11 virt-specifier-seq.
std::tuple< const Ts &... > Args
Decl * ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, RecordDecl *&AnonRecord)
ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e....
sema::CompoundScopeInfo & getCurCompoundScope() const
OMPClause * ActOnOpenMPSharedClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'shared' clause.
Represents a static or instance method of a struct/union/class.
NestedNameSpecInfo(IdentifierInfo *II, SourceLocation IdLoc, SourceLocation ColonColonLoc, ParsedType ObjectType=ParsedType())
Creates info object for the most typical case.
ExprResult ActOnGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< ParsedType > ArgTypes, ArrayRef< Expr * > ArgExprs)
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
DefaultedComparisonKind getDefaultedComparisonKind(const FunctionDecl *FD)
void checkRetainCycles(ObjCMessageExpr *msg)
checkRetainCycles - Check whether an Objective-C message send might create an obvious retain cycle.
@ TPL_TemplateTemplateParmMatch
We are matching the template parameter lists of two template template parameters as part of matching ...
void CheckDeductionGuideTemplate(FunctionTemplateDecl *TD)
void ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules)
void ActOnFinishInlineFunctionDef(FunctionDecl *D)
StmtResult ActOnOpenMPTeamsDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute parallel for simd' after parsing of the associate...
CXXConstructorDecl * LookupDefaultConstructor(CXXRecordDecl *Class)
Look up the default constructor for the given class.
ImplicitConversionSequence - Represents an implicit conversion sequence, which may be a standard conv...
void actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef< IdentifierInfo * > identifiers, ArrayRef< SourceLocation > identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl< ParsedType > &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl< Decl * > &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols)
Given a list of identifiers (and their locations), resolve the names to either Objective-C protocol q...
TypeSpecifierType
Specifies the kind of type.
llvm::DenseMap< const EnumDecl *, llvm::APInt > FlagBitsCache
A cache of the flags available in enumerations with the flag_bits attribute.
ParmVarDecl * SubstParmVarDecl(ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, Optional< unsigned > NumExpansions, bool ExpectParameterPack)
void clearDelayedTypo(TypoExpr *TE)
Clears the state of the given TypoExpr.
ExprResult CorrectDelayedTyposInExpr(Expr *E, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and r...
ASTConsumer & getASTConsumer() const
void enterReturn(Sema &S, SourceLocation Tok)
SmallVector< std::pair< FunctionDecl *, FunctionDecl * >, 2 > DelayedEquivalentExceptionSpecChecks
All the function redeclarations seen during a class definition that had their exception spec checks d...
NamedDecl * BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists)
Builds a using declaration.
void ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope)
Initialization of captured region for OpenMP region.
bool checkObjCBridgeRelatedComponents(SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose=true)
@ PotentiallyEvaluated
The current expression is potentially evaluated at run time, which means that code may be generated t...
OMPClause * ActOnOpenMPNowaitClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'nowait' clause.
ExprResult CheckSwitchCondition(SourceLocation SwitchLoc, Expr *Cond)
void AddArgumentDependentLookupCandidates(DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, TemplateArgumentListInfo *ExplicitTemplateArgs, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
Add function candidates found via argument-dependent lookup to the set of overloading candidates.
AccessResult CheckStructuredBindingMemberAccess(SourceLocation UseLoc, CXXRecordDecl *DecomposedClass, DeclAccessPair Field)
Checks implicit access to a member in a structured binding.
OMPClause * ActOnOpenMPAllocateClause(Expr *Allocator, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation ColonLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'allocate' clause.
bool areMatrixTypesOfTheSameDimension(QualType srcTy, QualType destTy)
Are the two types matrix types and do they have the same dimensions i.e.
StorageClass
Storage classes.
Decl * ActOnEmptyDeclaration(Scope *S, const ParsedAttributesView &AttrList, SourceLocation SemiLoc)
Handle a C++11 empty-declaration and attribute-declaration.
SourceLocation Loc
The location of the push attribute.